dropTable not schema-aware?
See original GitHub issueSo, you can createTable in a schema, it creates the table in the assigned schema, but seems like we are not able to dropTable on the down migration when reversing changes?
When using this migration:
return queryInterface.dropTable('ivr', {
schema: 'raw_filemaker'
});
gives
DROP TABLE IF EXISTS "ivr";
This is in v3.6.0 w/postgresql.
Upon superficial scan, seems like return Utils._.template(query)(values).trim() + ';'; in createTableQuery properly prepends the schema, whereas return Utils._.template(query)({...}); at the end of dropTableQuery does not. Oddly, they both call this.quoteTable(tableName)?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Dropping a database column in production without waiting ...
In the case of a column drop, we have at our disposal a “cheap” schema-aware strategy: ignored_columns (see the Rails PR). This directive...
Read more >Cannot drop table users because other objects depend on it
If you drop a database-user with 'cascade' option it will drop all dependend objects. For example all tables which the user owns (and...
Read more >DROP TABLE | CockroachDB Docs
The DROP TABLE statement performs a schema change. For more information about how online schema changes work in CockroachDB, see Online Schema Changes....
Read more >Complete Guide to SQL DROP Table Statement - eduCBA
Guide to SQL DROP Table. Here we discuss the introduction, how to create SQL drop table statement? examples and FAQ respectively.
Read more >SQL Server DROP TABLE IF EXISTS Examples
Then run an ALTER TABLE [schema].[table] DROP CONSTRIANT to drop the constraints. Without the constraints we can drop the tables in any order...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@paulxtiseo @mickhansen is right, try :
return queryInterface.dropTable( { tableName: ‘ivr’, schema: ‘raw_filemaker’
} );
it worked for me
I think it will be better if the options of
dropTableare consistent withcreateTable, so you could define schemas indropTablelike increateTable. I think it’s a security issue.