mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 22:16:01 +00:00
set NOT NULL for column with default value
This commit is contained in:
@@ -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[],
|
||||
|
||||
Reference in New Issue
Block a user