Fix wrong constraints
This commit is contained in:
parent
6d5e95af6e
commit
9b45c1fe92
|
@ -62,8 +62,6 @@
|
||||||
return `${type}${subtype || ""}`.toUpperCase()
|
return `${type}${subtype || ""}`.toUpperCase()
|
||||||
}
|
}
|
||||||
|
|
||||||
$: console.warn(fieldDefinitions)
|
|
||||||
|
|
||||||
let originalName
|
let originalName
|
||||||
let linkEditDisabled
|
let linkEditDisabled
|
||||||
let primaryDisplay
|
let primaryDisplay
|
||||||
|
@ -343,6 +341,7 @@
|
||||||
delete editableColumn.tableId
|
delete editableColumn.tableId
|
||||||
delete editableColumn.relationshipType
|
delete editableColumn.relationshipType
|
||||||
delete editableColumn.formulaType
|
delete editableColumn.formulaType
|
||||||
|
delete editableColumn.constraints
|
||||||
|
|
||||||
// Add in defaults and initial definition
|
// Add in defaults and initial definition
|
||||||
const definition = fieldDefinitions[type?.toUpperCase()]
|
const definition = fieldDefinitions[type?.toUpperCase()]
|
||||||
|
@ -398,6 +397,16 @@
|
||||||
return ALLOWABLE_NUMBER_OPTIONS
|
return ALLOWABLE_NUMBER_OPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userFieldDefinition =
|
||||||
|
fieldDefinitions[
|
||||||
|
makeFieldId(
|
||||||
|
FieldType.BB_REFERENCE,
|
||||||
|
editableColumn.type === FieldType.BB_REFERENCE
|
||||||
|
? editableColumn.subtype
|
||||||
|
: FieldSubtype.USER
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
if (!external) {
|
if (!external) {
|
||||||
return [
|
return [
|
||||||
fieldDefinitions.STRING,
|
fieldDefinitions.STRING,
|
||||||
|
@ -413,9 +422,7 @@
|
||||||
fieldDefinitions.LINK,
|
fieldDefinitions.LINK,
|
||||||
fieldDefinitions.FORMULA,
|
fieldDefinitions.FORMULA,
|
||||||
fieldDefinitions.JSON,
|
fieldDefinitions.JSON,
|
||||||
fieldDefinitions[
|
userFieldDefinition,
|
||||||
makeFieldId(FieldType.BB_REFERENCE, FieldSubtype.USER)
|
|
||||||
],
|
|
||||||
{ name: "Auto Column", type: AUTO_TYPE },
|
{ name: "Auto Column", type: AUTO_TYPE },
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
|
@ -429,12 +436,7 @@
|
||||||
fieldDefinitions.BOOLEAN,
|
fieldDefinitions.BOOLEAN,
|
||||||
fieldDefinitions.FORMULA,
|
fieldDefinitions.FORMULA,
|
||||||
fieldDefinitions.BIGINT,
|
fieldDefinitions.BIGINT,
|
||||||
fieldDefinitions[
|
userFieldDefinition,
|
||||||
getFieldId({
|
|
||||||
type: FieldType.BB_REFERENCE,
|
|
||||||
subtype: FieldSubtype.USER,
|
|
||||||
})
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
// no-sql or a spreadsheet
|
// no-sql or a spreadsheet
|
||||||
if (!external || table.sql) {
|
if (!external || table.sql) {
|
||||||
|
|
Loading…
Reference in New Issue