From f116950a83219a4d81103a4a14bc0491a665ac98 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 12 Aug 2024 15:25:51 -0500 Subject: [PATCH] Fix db:migrate script --- scripts/db-migrate.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/db-migrate.ts b/scripts/db-migrate.ts index b4a00d8c..ab0b9747 100644 --- a/scripts/db-migrate.ts +++ b/scripts/db-migrate.ts @@ -7,7 +7,10 @@ if (Deno.env.get('CI') && Conf.db.dialect === 'postgres') { await sleep(1_000); } -const kysely = await DittoDB.getInstance(); +// This migrates kysely internally. +const { kysely } = await DittoDB.getInstance(); + +// Close the connection before exiting. await kysely.destroy(); Deno.exit();