Fix user migration
This commit is contained in:
parent
3e4b0e8cd6
commit
d39c9bd3dd
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue