fix(test): migration error

This commit is contained in:
chenos 2023-12-21 21:03:03 +08:00
parent c492977233
commit 5e89a02044
2 changed files with 3 additions and 2 deletions

View File

@ -31,14 +31,14 @@ export class ApplicationVersion {
return null;
}
async update() {
async update(version?: string) {
await this.collection.sync();
await this.collection.model.destroy({
truncate: true,
});
await this.collection.model.create({
value: this.app.getVersion(),
value: version || this.app.getVersion(),
});
}

View File

@ -26,6 +26,7 @@ describe('nocobase-admin-menu', () => {
beforeEach(async () => {
app = await startApp();
await app.version.update('0.17.0-alpha.7');
});
afterEach(async () => {