From d1bb0126e3f1a20cbe3b9919f20b902ee723ab60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Drouyer?= Date: Sun, 21 Oct 2012 01:51:30 +0300 Subject: [PATCH] Fixed bug (oversight ?) on alter table Fixed bug (oversight ?) on alter table : it was still model name. --- lib/adapters/mysql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/adapters/mysql.js b/lib/adapters/mysql.js index a10a7eed..42cf83a9 100644 --- a/lib/adapters/mysql.js +++ b/lib/adapters/mysql.js @@ -460,7 +460,7 @@ MySQL.prototype.alterTable = function (model, actualFields, actualIndexes, done, }); if (sql.length) { - var query = 'ALTER TABLE `' + model + '` ' + sql.join(',\n'); + var query = 'ALTER TABLE ' + self.tableEscaped(model) + ' + sql.join(',\n'); if (checkOnly) { done(null, true, {statements: sql, query: query}); } else {