Fix switch
This commit is contained in:
parent
92b3cb2d92
commit
34d97ab16a
|
@ -54,7 +54,8 @@ function generateSchema(
|
||||||
) {
|
) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
switch (column.type) {
|
const columnType = column.type
|
||||||
|
switch (columnType) {
|
||||||
case FieldType.STRING:
|
case FieldType.STRING:
|
||||||
case FieldType.OPTIONS:
|
case FieldType.OPTIONS:
|
||||||
case FieldType.LONGFORM:
|
case FieldType.LONGFORM:
|
||||||
|
@ -128,8 +129,18 @@ function generateSchema(
|
||||||
.references(`${tableName}.${relatedPrimary}`)
|
.references(`${tableName}.${relatedPrimary}`)
|
||||||
}
|
}
|
||||||
break
|
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:
|
default:
|
||||||
utils.unreachable(column.type)
|
utils.unreachable(columnType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue