Clean types
This commit is contained in:
parent
d03e0cb1f6
commit
f3762885c6
|
@ -36,9 +36,7 @@ function checkAutoColumns(table: Table, oldTable?: Table) {
|
||||||
if (oldSchema && oldSchema.subtype) {
|
if (oldSchema && oldSchema.subtype) {
|
||||||
table.schema[key].subtype = oldSchema.subtype
|
table.schema[key].subtype = oldSchema.subtype
|
||||||
} else {
|
} else {
|
||||||
table.schema[key] = fixAutoColumnSubType(
|
table.schema[key] = fixAutoColumnSubType(schema)
|
||||||
schema as AutoColumnFieldMetadata
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return table
|
return table
|
||||||
|
@ -84,7 +82,7 @@ export async function save(ctx: UserCtx<SaveTableRequest, SaveTableResponse>) {
|
||||||
for (const propKey of Object.keys(tableToSave.schema)) {
|
for (const propKey of Object.keys(tableToSave.schema)) {
|
||||||
let oldColumn = oldTable.schema[propKey]
|
let oldColumn = oldTable.schema[propKey]
|
||||||
if (oldColumn && oldColumn.type === FieldTypes.INTERNAL) {
|
if (oldColumn && oldColumn.type === FieldTypes.INTERNAL) {
|
||||||
oldColumn.type = FieldTypes.AUTO as any // TODO
|
oldTable.schema[propKey].type = FieldTypes.AUTO
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue