This commit is contained in:
SPRINX0\prochazka
2024-11-18 13:47:47 +01:00
5 changed files with 104 additions and 27 deletions

View File

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

View File

@@ -459,7 +459,7 @@ export class AlterPlan {
// console.log('*****************RECREATED NEEDED', op, operationType, isAllowed);
// console.log(this.dialect);
if (!this.opts.allowTableRecreate) {
if (this.opts.noDropTable && !this.opts.allowTableRecreate) {
// skip this operation, as it cannot be achieved
return [];
}