SYNC: some fixes

This commit is contained in:
SPRINX0\prochazka
2025-02-24 15:18:35 +01:00
committed by Diflow
parent afcb226111
commit 963994b1e5
7 changed files with 31 additions and 8 deletions

View File

@@ -259,11 +259,21 @@ export class SqlDumper implements AlterProcessor {
this.putRaw(' ');
this.specialColumnOptions(column);
if (includeNullable && !this.dialect?.specificNullabilityImplementation) {
this.put(column.notNull ? '^not ^null' : '^null');
}
if (includeDefault && column.defaultValue?.toString()?.trim()) {
this.columnDefault(column);
if (this.dialect?.defaultValueBeforeNullability) {
if (includeDefault && column.defaultValue?.toString()?.trim()) {
this.columnDefault(column);
}
if (includeNullable && !this.dialect?.specificNullabilityImplementation) {
this.put(column.notNull ? '^not ^null' : '^null');
}
} else {
if (includeNullable && !this.dialect?.specificNullabilityImplementation) {
this.put(column.notNull ? '^not ^null' : '^null');
}
if (includeDefault && column.defaultValue?.toString()?.trim()) {
this.columnDefault(column);
}
}
}