Fix user migration

This commit is contained in:
Adria Navarro 2024-04-26 15:34:39 +02:00
parent 3e4b0e8cd6
commit d39c9bd3dd
1 changed files with 6 additions and 6 deletions

View File

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