Skip to content
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

Migration fails to drop an index due to bad name #276

Closed
xaka opened this issue May 19, 2014 · 1 comment · Fixed by #278
Closed

Migration fails to drop an index due to bad name #276

xaka opened this issue May 19, 2014 · 1 comment · Fixed by #278

Comments

@xaka
Copy link
Contributor

xaka commented May 19, 2014

Hello there,

Create a unique index:

knex.schema.table('my_table', function (table) {
  table.unique([ 'column_1', 'column_2' ]);
});

Gives you unique index named my_table_column_1_column_2_unique

Drop a unique index:

knex.schema.table('my_table', function (table) {
  table.dropUnique(['column_1', 'column_2']);
});

Tries to use unique index named my_table_column_1_column_2_dropunique (pay attention at drop word which should not be there).

@xaka
Copy link
Contributor Author

xaka commented May 24, 2014

@tgriesser ping! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant