drop column with default works

This commit is contained in:
Jan Prochazka
2021-09-05 11:18:44 +02:00
parent e79e19c614
commit eaa5970a0f
4 changed files with 25 additions and 14 deletions

View File

@@ -65,6 +65,13 @@ class MsSqlDumper extends SqlDumper {
super.dropTable(obj, options);
}
dropColumn(column) {
if (column.defaultConstraint) {
this.putCmd('^alter ^table %f ^drop ^constraint %i', column, column.defaultConstraint);
}
super.dropColumn(column);
}
dropDefault(col) {
if (col.defaultConstraint) {
this.putCmd('^alter ^table %f ^drop ^constraint %i', col, col.defaultConstraint);