SQL time only column creation as time

This commit is contained in:
Adria Navarro 2024-05-20 16:31:11 +02:00
parent 5dc75582d9
commit 9f75922011
1 changed files with 7 additions and 3 deletions

View File

@ -79,9 +79,13 @@ function generateSchema(
schema.boolean(key) schema.boolean(key)
break break
case FieldType.DATETIME: case FieldType.DATETIME:
schema.datetime(key, { if (!column.timeOnly) {
useTz: !column.ignoreTimezones, schema.datetime(key, {
}) useTz: !column.ignoreTimezones,
})
} else {
schema.time(key)
}
break break
case FieldType.ARRAY: case FieldType.ARRAY:
case FieldType.BB_REFERENCE: case FieldType.BB_REFERENCE: