Use RelationshipType enum instead of raw string.
This commit is contained in:
parent
2c5dd99da2
commit
ef84e96f98
|
@ -7,7 +7,7 @@
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { getContext } from "svelte"
|
import { getContext } from "svelte"
|
||||||
import { ValidColumnNameRegex } from "@budibase/shared-core"
|
import { ValidColumnNameRegex } from "@budibase/shared-core"
|
||||||
import { FieldSubtype } from "@budibase/types"
|
import { FieldSubtype, RelationshipType } from "@budibase/types"
|
||||||
|
|
||||||
const { API, definition, rows } = getContext("grid")
|
const { API, definition, rows } = getContext("grid")
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
const migrateUserColumn = async () => {
|
const migrateUserColumn = async () => {
|
||||||
let subtype = FieldSubtype.USERS
|
let subtype = FieldSubtype.USERS
|
||||||
if (column.schema.relationshipType === "one-to-many") {
|
if (column.schema.relationshipType === RelationshipType.ONE_TO_MANY) {
|
||||||
subtype = FieldSubtype.USER
|
subtype = FieldSubtype.USER
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue