fix: remove plugins after migration
This commit is contained in:
		
							parent
							
								
									6f23174389
								
							
						
					
					
						commit
						dcc29892e6
					
				@ -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'],
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -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',
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    });
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user