|
|
|
@ -39,13 +39,13 @@ export function useTable(onTableCreate?: (tableMeta: TableType) => void, baseId?
|
|
|
|
|
const createTable = async () => { |
|
|
|
|
if (!sqlUi?.value) return |
|
|
|
|
const columns = sqlUi?.value?.getNewTableColumns().filter((col) => { |
|
|
|
|
if (col.column_name === 'id' && table.columns.includes('id_ag')) { |
|
|
|
|
if (col.column_name.toLowerCase() === 'id' && table.columns.includes('id_ag')) { |
|
|
|
|
Object.assign(col, sqlUi?.value?.getDataTypeForUiType({ uidt: UITypes.ID }, 'AG')) |
|
|
|
|
col.dtxp = sqlUi?.value?.getDefaultLengthForDatatype(col.dt) |
|
|
|
|
col.dtxs = sqlUi?.value?.getDefaultScaleForDatatype(col.dt) |
|
|
|
|
return true |
|
|
|
|
} |
|
|
|
|
return table.columns.includes(col.column_name) |
|
|
|
|
return table.columns.includes(col.column_name.toLowerCase()) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|