budibase/packages/shared-core/src/helpers/schema.ts

14 lines
335 B
TypeScript
Raw Normal View History

2024-05-09 12:28:44 +02:00
import {
BBReferenceFieldSubType,
FieldSchema,
FieldType,
} from "@budibase/types"
export function isDeprecatedSingleUserColumn(schema: FieldSchema) {
const result =
schema.type === FieldType.BB_REFERENCE &&
schema.subtype === BBReferenceFieldSubType.USER &&
schema.constraints?.type !== "array"
return result
}