Use FieldSubtype enum instead of raw strings.
This commit is contained in:
parent
7acce7b7c0
commit
2c5dd99da2
|
@ -7,6 +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"
|
||||||
|
|
||||||
const { API, definition, rows } = getContext("grid")
|
const { API, definition, rows } = getContext("grid")
|
||||||
|
|
||||||
|
@ -25,9 +26,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const migrateUserColumn = async () => {
|
const migrateUserColumn = async () => {
|
||||||
let subtype = "users"
|
let subtype = FieldSubtype.USERS
|
||||||
if (column.schema.relationshipType === "one-to-many") {
|
if (column.schema.relationshipType === "one-to-many") {
|
||||||
subtype = "user"
|
subtype = FieldSubtype.USER
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue