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

@@ -731,6 +731,12 @@ export class SqlDumper implements AlterProcessor {
this.put(formatString, optionValue);
}
fillNewNotNullDefaults(col: ColumnInfo) {
if (col.notNull && col.defaultValue) {
this.putCmd('^update %f ^set %i = %s ^where %i ^is ^null', col, col.columnName, col.defaultValue, col.columnName);
}
}
fillPreloadedRows(
table: NamedObjectInfo,
oldRows: any[],