Skip to content

Commit

Permalink
fix(query-generator): syntax error in Postgres when using SMALLINT wi…
Browse files Browse the repository at this point in the history
…th autoIncrement
  • Loading branch information
Michael Yates authored and Michael Yates committed May 6, 2018
1 parent f0ae18d commit d5fcf53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/dialects/postgres/query-generator.js
Expand Up @@ -843,6 +843,9 @@ const QueryGenerator = {
if (_.includes(dataType, 'BIGINT')) {
dataType = dataType.replace(/SERIAL/, 'BIGSERIAL');
dataType = dataType.replace(/BIGINT/, '');
} else if (_.includes(dataType, 'SMALLINT')) {
dataType = dataType.replace(/SERIAL/, 'SMALLSERIAL');
dataType = dataType.replace(/SMALLINT/, '');
} else {
dataType = dataType.replace(/INTEGER/, '');
}
Expand Down

0 comments on commit d5fcf53

Please sign in to comment.