From 7891648801584cccc16cc525127df7063c7ed806 Mon Sep 17 00:00:00 2001 From: "A.G.J. Cate" Date: Wed, 27 Nov 2024 13:55:00 +0100 Subject: [PATCH] fix: run migrations when resetting the database --- packages/agent-config/src/dataSources.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/agent-config/src/dataSources.ts b/packages/agent-config/src/dataSources.ts index 7a8ceed2a..58438dd40 100644 --- a/packages/agent-config/src/dataSources.ts +++ b/packages/agent-config/src/dataSources.ts @@ -154,5 +154,6 @@ export const revertMigration = async (dataSource: DataSource): Promise => } export const resetDatabase = async (dbName: string): Promise => { await dropDatabase(dbName) - await getDbConnection(dbName) + const connection = await getDbConnection(dbName) + await connection.runMigrations() }