Skip to content

Commit

Permalink
fix(escaping): join rather than pass array to util format
Browse files Browse the repository at this point in the history
fixes db-migrate/node-db-migrate#635

Signed-off-by: Tobias Gurtzick <magic@wizardtales.com>
  • Loading branch information
wzrdtales committed Dec 11, 2019
1 parent dbf2380 commit 7053c78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ var MysqlDriver = Base.extend({
'ALTER TABLE `%s` ADD CONSTRAINT `%s` FOREIGN KEY (%s) REFERENCES `%s` (%s) ON DELETE %s ON UPDATE %s',
tableName,
keyName,
this.quoteDDLArr(columns),
this.quoteDDLArr(columns).join(', '),
referencedTableName,
this.quoteDDLArr(referencedColumns),
this.quoteDDLArr(referencedColumns).join(', '),
rules.onDelete || 'NO ACTION',
rules.onUpdate || 'NO ACTION'
);
Expand Down

0 comments on commit 7053c78

Please sign in to comment.