-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dropIndex doesn't generate the correct name for a unique index #857
Comments
hi @georgeroman! Yes, i see the problem. While we fixing it - some other options to consider for you:
|
@georgeroman one other note - the fix seems to be just in type - so if you ignore ts error or use js then you can just provide
|
Fix is realized in https://github.com/salsita/node-pg-migrate/releases/tag/v6.1.0. Thank you! |
Perfect, thank you for the quick response and fix! |
Unique indexes created via
createIndex(table, column, { unique: true })
get assigned a name following the pattern:table_column_unique_index
. However, when the same index needs to be dropped viadropIndex
, there is no option to specify that the index isunique
and sodropIndex
will try to drop the index namedtable_column_index
which is different than what we want. A fix for this would add aunique
option todropIndex
so that it can generate the correct index name.The text was updated successfully, but these errors were encountered: