mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 05:26:00 +00:00
enum + set for mysql (#693)
* enum + set for mysql * enum + set for mysql | dropdown * enum for mysql | removed empty option
This commit is contained in:
@@ -205,7 +205,18 @@ export class SqlDumper implements AlterProcessor {
|
||||
if (column.isPersisted) this.put(' ^persisted');
|
||||
return;
|
||||
}
|
||||
this.put('%k', column.dataType || this.dialect.fallbackDataType);
|
||||
|
||||
const type = column.dataType || this.dialect.fallbackDataType;
|
||||
const typeWithValues = type.match(/([^(]+)(\(.+[^)]\))/);
|
||||
|
||||
if (typeWithValues?.length) {
|
||||
typeWithValues.shift();
|
||||
this.putRaw(SqlDumper.convertKeywordCase(typeWithValues.shift()));
|
||||
this.putRaw(typeWithValues);
|
||||
} else {
|
||||
this.putRaw(SqlDumper.convertKeywordCase(type));
|
||||
}
|
||||
|
||||
if (column.autoIncrement) {
|
||||
this.autoIncrement();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user