We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 339275a commit a1db4e8Copy full SHA for a1db4e8
src/maintenance/database-manager.ts
@@ -41,11 +41,12 @@ export class DatabaseManager {
41
}
42
43
async refresh(em: EntityManager) {
44
- return em.transactional(async (_em) => {
+ return em.fork().transactional(async (_em) => {
45
const ctx: Transaction = _em.getTransactionContext();
46
await this.dropSchema(_em, ctx);
47
await this.createSchema(_em, ctx);
48
await this.seed(_em);
49
+ _em.clear();
50
return true;
51
});
52
0 commit comments