Skip to content

Commit

Permalink
fix problem with removeColumn trying to delete nonexistent foreign ke…
Browse files Browse the repository at this point in the history
  • Loading branch information
paolord committed May 1, 2016
1 parent ed0068a commit 24f9238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dialects/mysql/query-generator.js
Expand Up @@ -357,8 +357,8 @@ var QueryGenerator = {
return [
'SELECT CONSTRAINT_NAME as constraint_name',
'FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE',
'WHERE TABLE_NAME = ' + wrapSingleQuote(tableName),
'AND COLUMN_NAME = ' + wrapSingleQuote(columnName),
'WHERE REFERENCED_TABLE_NAME = ' + wrapSingleQuote(tableName),
'AND REFERENCED_COLUMN_NAME = ' + wrapSingleQuote(columnName),
].join(' ');
},

Expand Down

0 comments on commit 24f9238

Please sign in to comment.