This commit is contained in:
Adria Navarro 2023-09-14 15:18:54 +02:00
parent eb748db3be
commit 85a9b9ab21
2 changed files with 3 additions and 5 deletions

View File

@ -66,7 +66,7 @@
let jsonSchemaModal
let allowedTypes = []
let editableColumn = {
type: "string",
type: fieldDefinitions.STRING.type,
constraints: fieldDefinitions.STRING.constraints,
// Initial value for column name in other table for linked records
fieldName: $tables.selected.name,

View File

@ -422,13 +422,11 @@ export function hasTypeChanged(table: Table, oldTable: Table | undefined) {
if (!oldTable) {
return false
}
let key: any
let field: any
for ([key, field] of Object.entries(oldTable.schema)) {
const oldType = field.type
for (let [key, field] of Object.entries(oldTable.schema)) {
if (!table.schema[key]) {
continue
}
const oldType = field.type
const newType = table.schema[key].type
if (oldType !== newType && !areSwitchableTypes(oldType, newType)) {
return true