Skip to content

Commit

Permalink
fix(mssql): use uppercase for engine table and columns (#12212)
Browse files Browse the repository at this point in the history
  • Loading branch information
JuarezLustosa committed May 3, 2020
1 parent 5a4d260 commit 777ec09
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/dialects/mssql/query-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ class MSSQLQueryGenerator extends AbstractQueryGenerator {
'INNER JOIN',
'INFORMATION_SCHEMA.COLUMNS c ON t.TABLE_NAME = c.TABLE_NAME AND t.TABLE_SCHEMA = c.TABLE_SCHEMA',
'LEFT JOIN (SELECT tc.table_schema, tc.table_name, ',
'cu.column_name, tc.constraint_type ',
'FROM information_schema.TABLE_CONSTRAINTS tc ',
'JOIN information_schema.KEY_COLUMN_USAGE cu ',
'cu.column_name, tc.CONSTRAINT_TYPE ',
'FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc ',
'JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE cu ',
'ON tc.table_schema=cu.table_schema and tc.table_name=cu.table_name ',
'and tc.constraint_name=cu.constraint_name ',
'and tc.constraint_type=\'PRIMARY KEY\') pk ',
'and tc.CONSTRAINT_TYPE=\'PRIMARY KEY\') pk ',
'ON pk.table_schema=c.table_schema ',
'AND pk.table_name=c.table_name ',
'AND pk.column_name=c.column_name ',
Expand Down

0 comments on commit 777ec09

Please sign in to comment.