removeIndex not working with schema
See original GitHub issueWhat are you doing?
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.addIndex({
tableName: 'user',
schema: 'core',
}, [
'username',
]);
},
down: (queryInterface, Sequelize) => {
return queryInterface.removeIndex({
tableName: 'user',
schema: 'core',
}, [
'username',
]);
},
};
To Reproduce Steps to reproduce the behavior:
- run migraion
- undo migration
What do you expect to happen?
add and remove index
What is actually happening?
index not removed
the query generated in wrong
DROP INDEX IF EXISTS "[object _object]_username"
Environment
Dialect:
- mysql
- postgres
- sqlite
- mssql
- any Dialect library version: 7.11.0 Database version: PostgreSQL 11.2, compiled by Visual C++ build 1914, 64-bit Sequelize version: 5.8.6 Node Version: 10.15.3 OS: Windows 10 If TypeScript related: TypeScript version: XXX Tested with latest release:
- No
- Yes, specify that version:
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Symfony Doctrine migrations : removeIndex not working
I'm using Symfony 1.4 with Doctrine. Here's my initial schema: Page: tableName: page columns: ref: type: string(50) notnull: true ...
Read more >field_update_field() fails if a field schema removes an index ... - Drupal
The problem I'm experiencing is that when field_update_field() is called which should drop the old field table and re-create with the current schema, ......
Read more >QueryInterface - Sequelize
If not specified, sequelize automatically creates a named constraint based on constraint type, table & column names. options.defaultValue, string. optional.
Read more >Migration Operations - Django documentation
Django also uses these Operation objects to work out what your models looked like ... Does not affect the database, but persists these...
Read more >Running a safe database migration using Postgres - Retool
Retool has navigated a lot of issues related to Postgres migrations. This post highlights lessons learned & how to avoid making the same ......
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
OR
Is there any progress on this issue?