Skip to content

Commit

Permalink
[TM-1452] Another attempt at avoiding the sync errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
roguenet committed Nov 20, 2024
1 parent 6919459 commit 7c07768
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions setup-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,11 @@ beforeAll(async () => {
password: "wri",
database: "terramatch_microservices_test",
models: Object.values(Entities),
logging: false
logging: false,
sync: { alter: true }
});

try {
await sequelize.sync();
} catch (e) {
// We can ignore this in most cases because it probably means another task has already synced
// the DB
console.info("Error Synchronizing DB Schema", e);
}
await sequelize.sync();
FactoryGirl.setAdapter(new SequelizeAdapter());
});

Expand Down

0 comments on commit 7c07768

Please sign in to comment.