不要怂,就是干,撸起袖子干!

Commit 8be21776 by Jan Aagaard Meier

Merge pull request #4321 from LeekAnarchism/mssql-removecolumn

Fix removeColumnQuery for mssql dialect
2 parents 84c9a68e cfef3366
...@@ -170,7 +170,7 @@ var QueryGenerator = { ...@@ -170,7 +170,7 @@ var QueryGenerator = {
}, },
removeColumnQuery: function(tableName, attributeName) { removeColumnQuery: function(tableName, attributeName) {
var query = 'ALTER TABLE <%= tableName %> DROP <%= attributeName %>;'; var query = 'ALTER TABLE <%= tableName %> DROP COLUMN <%= attributeName %>;';
return Utils._.template(query)({ return Utils._.template(query)({
tableName: this.quoteTable(tableName), tableName: this.quoteTable(tableName),
attributeName: this.quoteIdentifier(attributeName) attributeName: this.quoteIdentifier(attributeName)
......
...@@ -15,11 +15,11 @@ if (current.dialect.name !== 'sqlite') { ...@@ -15,11 +15,11 @@ if (current.dialect.name !== 'sqlite') {
schema: 'archive', schema: 'archive',
tableName: 'user' tableName: 'user'
}, 'email'), { }, 'email'), {
mssql: 'ALTER TABLE [archive].[user] DROP [email];', mssql: 'ALTER TABLE [archive].[user] DROP COLUMN [email];',
mysql: 'ALTER TABLE `archive.user` DROP `email`;', mysql: 'ALTER TABLE `archive.user` DROP `email`;',
postgres: 'ALTER TABLE "archive"."user" DROP COLUMN "email";', postgres: 'ALTER TABLE "archive"."user" DROP COLUMN "email";',
}); });
}); });
}); });
}); });
} }
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!