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

You need to sign in or sign up before continuing.
Commit 5aca6108 by Trey Thomas

MariaDB: drop foreign key before dropping column

1 parent a06a92d5
Showing with 2 additions and 1 deletions
...@@ -364,7 +364,8 @@ QueryInterface.prototype.removeColumn = function(tableName, attributeName, optio ...@@ -364,7 +364,8 @@ QueryInterface.prototype.removeColumn = function(tableName, attributeName, optio
// mssql needs special treatment as it cannot drop a column with a default or foreign key constraint // mssql needs special treatment as it cannot drop a column with a default or foreign key constraint
return MSSSQLQueryInterface.removeColumn.call(this, tableName, attributeName, options); return MSSSQLQueryInterface.removeColumn.call(this, tableName, attributeName, options);
case 'mysql': case 'mysql':
// mysql needs special treatment as it cannot drop a column with a foreign key constraint case 'mariadb':
// mysql/maria needs special treatment as it cannot drop a column with a foreign key constraint
return MySQLQueryInterface.removeColumn.call(this, tableName, attributeName, options); return MySQLQueryInterface.removeColumn.call(this, tableName, attributeName, options);
default: default:
var sql = this.QueryGenerator.removeColumnQuery(tableName, attributeName); var sql = this.QueryGenerator.removeColumnQuery(tableName, attributeName);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!