diff --git a/src/db/models/location.ts b/src/db/models/location.ts index 2e0e47ab..1aeab583 100644 --- a/src/db/models/location.ts +++ b/src/db/models/location.ts @@ -12,10 +12,10 @@ export type LocationId = Brand< export const LOCATION_ID = brandedType(t.number); -const LOCATION_STATUS = { +const LOCATION_STATUS = t.keyof({ active: null, expired: null, -}; +}); export default defineIDModel({ tableName: 'location', @@ -38,8 +38,8 @@ export default defineIDModel({ accidentallyOptional: { adminLevel: { kind: 'checked', type: t.number }, status: { - kind: 'enum', - values: LOCATION_STATUS, + kind: 'checked', + type: LOCATION_STATUS, }, itosSync: { kind: 'checked', type: t.boolean }, }, diff --git a/src/db/models/planVersion.ts b/src/db/models/planVersion.ts index 696e2ea6..e09551cc 100644 --- a/src/db/models/planVersion.ts +++ b/src/db/models/planVersion.ts @@ -15,10 +15,10 @@ export type PlanVersionId = Brand< export const PLAN_VERSION_ID = brandedType(t.number); -const PLAN_VERSION_CLUSTER_SELECTION_TYPE = { +const PLAN_VERSION_CLUSTER_SELECTION_TYPE = t.keyof({ single: null, multi: null, -}; +}); export default defineLegacyVersionedModel({ tableName: 'planVersion', @@ -46,8 +46,8 @@ export default defineLegacyVersionedModel({ lastPublishedReportingPeriodId: { kind: 'checked', type: t.number }, // Even though this column isn't defined using DB enum only two values are used clusterSelectionType: { - kind: 'enum', - values: PLAN_VERSION_CLUSTER_SELECTION_TYPE, + kind: 'checked', + type: PLAN_VERSION_CLUSTER_SELECTION_TYPE, }, }, },