set NOT NULL for column with default value

This commit is contained in:
Jan Prochazka
2024-11-18 13:41:29 +01:00
parent 85c4821606
commit 1ce8f6bd1f
4 changed files with 80 additions and 26 deletions

View File

@@ -132,6 +132,7 @@ class MsSqlDumper extends SqlDumper {
} else {
this.dropDefault(oldcol);
if (oldcol.columnName != newcol.columnName) this.renameColumn(oldcol, newcol.columnName);
this.fillNewNotNullDefaults(newcol);
this.put('^alter ^table %f ^alter ^column %i ', oldcol, oldcol.columnName, newcol.columnName);
this.columnDefinition(newcol, { includeDefault: false });
this.endCommand();