mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-01 07:23:58 +00:00
mysql change column to not null
This commit is contained in:
@@ -263,7 +263,7 @@ export class SqlDumper implements AlterProcessor {
|
||||
}
|
||||
|
||||
columnDefault(column: ColumnInfo) {
|
||||
if (column.defaultConstraint != null) {
|
||||
if (column.defaultConstraint != null && this.dialect?.namedDefaultConstraint) {
|
||||
this.put(' ^constraint %i ^default %s ', column.defaultConstraint, column.defaultValue);
|
||||
} else {
|
||||
this.put(' ^default %s ', column.defaultValue);
|
||||
|
||||
1
packages/types/dialect.d.ts
vendored
1
packages/types/dialect.d.ts
vendored
@@ -37,6 +37,7 @@ export interface SqlDialect {
|
||||
renameSqlObject?: boolean;
|
||||
multipleSchema?: boolean;
|
||||
filteredIndexes?: boolean;
|
||||
namedDefaultConstraint?: boolean;
|
||||
|
||||
specificNullabilityImplementation?: boolean;
|
||||
omitForeignKeys?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user