mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 01:55:59 +00:00
fixes
This commit is contained in:
@@ -199,14 +199,8 @@ export class SqlDumper implements AlterProcessor {
|
||||
|
||||
selectScopeIdentity(table: TableInfo) {}
|
||||
|
||||
columnDefinition(column: ColumnInfo, { includeDefault = true, includeNullable = true, includeCollate = true } = {}) {
|
||||
if (column.computedExpression) {
|
||||
this.put('^as %s', column.computedExpression);
|
||||
if (column.isPersisted) this.put(' ^persisted');
|
||||
return;
|
||||
}
|
||||
|
||||
const type = column.dataType || this.dialect.fallbackDataType;
|
||||
columnType(dataType: string) {
|
||||
const type = dataType || this.dialect.fallbackDataType;
|
||||
const typeWithValues = type.match(/([^(]+)(\(.+[^)]\))/);
|
||||
|
||||
if (typeWithValues?.length) {
|
||||
@@ -217,6 +211,17 @@ export class SqlDumper implements AlterProcessor {
|
||||
this.putRaw(SqlDumper.convertKeywordCase(type));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
columnDefinition(column: ColumnInfo, { includeDefault = true, includeNullable = true, includeCollate = true } = {}) {
|
||||
if (column.computedExpression) {
|
||||
this.put('^as %s', column.computedExpression);
|
||||
if (column.isPersisted) this.put(' ^persisted');
|
||||
return;
|
||||
}
|
||||
|
||||
this.columnType(column.dataType);
|
||||
|
||||
if (column.autoIncrement) {
|
||||
this.autoIncrement();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user