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();