1
0
Fork 0
mirror of synced 2024-09-18 10:20:11 +12:00

Fix switch

This commit is contained in:
Adria Navarro 2024-04-26 09:15:00 +02:00
parent 92b3cb2d92
commit 34d97ab16a

View file

@ -54,7 +54,8 @@ function generateSchema(
) {
continue
}
switch (column.type) {
const columnType = column.type
switch (columnType) {
case FieldType.STRING:
case FieldType.OPTIONS:
case FieldType.LONGFORM:
@ -128,8 +129,18 @@ function generateSchema(
.references(`${tableName}.${relatedPrimary}`)
}
break
case FieldType.FORMULA:
// This is allowed, but nothing to do on the external datasource
break
case FieldType.ATTACHMENTS:
case FieldType.ATTACHMENT_SINGLE:
case FieldType.AUTO:
case FieldType.JSON:
case FieldType.INTERNAL:
throw `${column.type} is not a valid SQL type`
default:
utils.unreachable(column.type)
utils.unreachable(columnType)
}
}