mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 16:46:31 +00:00
Merge branch 'refactor/association-field' of github.com:nocobase/nocobase into refactor/association-field
This commit is contained in:
commit
8093a998b5
@ -4,6 +4,12 @@ import { FieldModel } from '../models';
|
||||
|
||||
export default class extends Migration {
|
||||
async up() {
|
||||
const result = await this.app.version.satisfies('<0.9.2-alpha.2');
|
||||
|
||||
if (!result) {
|
||||
return;
|
||||
}
|
||||
|
||||
const transaction = await this.db.sequelize.transaction();
|
||||
|
||||
const migrateFieldsSchema = async (collection: Collection) => {
|
||||
|
@ -41,6 +41,12 @@ export default class extends Migration {
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
if (schema['x-component-props']?.mode === 'tags') {
|
||||
schema['x-component-props']['enableLink'] = true;
|
||||
} else if (schema['x-component-props']?.mode === 'links') {
|
||||
schema['x-component-props']['enableLink'] = true;
|
||||
}
|
||||
schema['x-component-props']['mode'] = 'Picker';
|
||||
item.set('schema', schema);
|
||||
await item.save({ transaction });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user