1
0
Fork 0
mirror of synced 2024-09-12 23:43:09 +12:00

Fix user migration

This commit is contained in:
Adria Navarro 2024-04-26 15:34:39 +02:00
parent 3e4b0e8cd6
commit d39c9bd3dd

View file

@ -33,10 +33,10 @@
}
const migrateUserColumn = async () => {
let subtype = BBReferenceFieldSubType.USERS
if (column.schema.relationshipType === RelationshipType.ONE_TO_MANY) {
subtype = BBReferenceFieldSubType.USER
}
const type =
column.schema.relationshipType === RelationshipType.ONE_TO_MANY
? FieldType.BB_REFERENCE_SINGLE
: FieldType.BB_REFERENCE
try {
await API.migrateColumn({
@ -44,8 +44,8 @@
oldColumn: column.schema,
newColumn: {
name: newColumnName,
type: FieldType.BB_REFERENCE,
subtype,
type,
subtype: BBReferenceFieldSubType.USER,
},
})
notifications.success("Column migrated")