Fix checks

This commit is contained in:
Adria Navarro 2024-05-23 11:34:58 +02:00
parent b3bea1e839
commit 028afd9cca
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ function validate(table: Table, oldTable?: Table) {
if (column.type === FieldType.DATETIME) {
const oldColumn = oldTable?.schema[key] as typeof column
if (column.timeOnly !== oldColumn.timeOnly) {
if (oldColumn && column.timeOnly !== oldColumn.timeOnly) {
throw new Error(
`Column "${key}" can not change from time to datetime or viceversa.`
)