diff --git a/packages/plugins/formula-field/src/server/migrations/20230213161903-alter-field.ts b/packages/plugins/formula-field/src/server/migrations/20230213161904-alter-field.ts similarity index 84% rename from packages/plugins/formula-field/src/server/migrations/20230213161903-alter-field.ts rename to packages/plugins/formula-field/src/server/migrations/20230213161904-alter-field.ts index 780a96f9c..621f9352a 100644 --- a/packages/plugins/formula-field/src/server/migrations/20230213161903-alter-field.ts +++ b/packages/plugins/formula-field/src/server/migrations/20230213161904-alter-field.ts @@ -28,6 +28,13 @@ export default class extends Migration { await schema.save({ transaction }); } } + + const repository = db.getRepository('applicationPlugins'); + await repository.destroy({ + filter: { + 'name.$in': ['math-formula-field', 'excel-formula-field'], + }, + }); }); } } diff --git a/packages/presets/nocobase/src/migrations/202302221000-del-formula-plugin.ts b/packages/presets/nocobase/src/migrations/202302221000-del-formula-plugin.ts deleted file mode 100644 index 4003fef5a..000000000 --- a/packages/presets/nocobase/src/migrations/202302221000-del-formula-plugin.ts +++ /dev/null @@ -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', - ], - }, - }); - } -}