mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 00:16:00 +00:00
fix
This commit is contained in:
@@ -7,6 +7,7 @@ export interface ColumnInfoYaml {
|
|||||||
name: string;
|
name: string;
|
||||||
type: string;
|
type: string;
|
||||||
notNull?: boolean;
|
notNull?: boolean;
|
||||||
|
length?: number;
|
||||||
autoIncrement?: boolean;
|
autoIncrement?: boolean;
|
||||||
references?: string;
|
references?: string;
|
||||||
primaryKey?: boolean;
|
primaryKey?: boolean;
|
||||||
@@ -67,7 +68,7 @@ function columnInfoFromYaml(column: ColumnInfoYaml, table: TableInfoYaml): Colum
|
|||||||
const res: ColumnInfo = {
|
const res: ColumnInfo = {
|
||||||
pureName: table.name,
|
pureName: table.name,
|
||||||
columnName: column.name,
|
columnName: column.name,
|
||||||
dataType: column.type,
|
dataType: column.length ? `${column.type}(${column.length})` : column.type,
|
||||||
autoIncrement: column.autoIncrement,
|
autoIncrement: column.autoIncrement,
|
||||||
notNull: column.notNull || (table.primaryKey && table.primaryKey.includes(column.name)),
|
notNull: column.notNull || (table.primaryKey && table.primaryKey.includes(column.name)),
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user