diff --git a/packages/server/src/sdk/app/tables/external/index.ts b/packages/server/src/sdk/app/tables/external/index.ts index 98e6e561c8..53302085fc 100644 --- a/packages/server/src/sdk/app/tables/external/index.ts +++ b/packages/server/src/sdk/app/tables/external/index.ts @@ -73,6 +73,16 @@ function validate(table: Table, oldTable?: Table) { `Column "${key}" has subtype "${column.subtype}" - this is not supported.` ) } + + if (column.type === FieldType.DATETIME) { + const oldColumn = oldTable?.schema[key] as typeof column + + if (column.timeOnly !== oldColumn.timeOnly) { + throw new Error( + `Column "${key}" can not change from time to datetime or viceversa.` + ) + } + } } }