fix: remove plugins after migration

This commit is contained in:
chenos 2023-02-22 11:29:15 +08:00
parent 6f23174389
commit dcc29892e6
2 changed files with 7 additions and 15 deletions

View File

@ -28,6 +28,13 @@ export default class extends Migration {
await schema.save({ transaction }); await schema.save({ transaction });
} }
} }
const repository = db.getRepository('applicationPlugins');
await repository.destroy({
filter: {
'name.$in': ['math-formula-field', 'excel-formula-field'],
},
});
}); });
} }
} }

View File

@ -1,15 +0,0 @@
import { Migration } from '@nocobase/server';
export default class extends Migration {
async up() {
const repository = this.context.db.getRepository('applicationPlugins');
await repository.destroy({
filter: {
'name.$in': [
'math-formula-field',
'excel-formula-field',
],
},
});
}
}