From 149f8f6f04b5388bfff39e2742eeed594f855d48 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 11 Oct 2023 22:30:07 -0500 Subject: [PATCH] Enable WAL mode on the database --- src/db/migrations/008_wal.ts | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/db/migrations/008_wal.ts diff --git a/src/db/migrations/008_wal.ts b/src/db/migrations/008_wal.ts new file mode 100644 index 0000000..7f96226 --- /dev/null +++ b/src/db/migrations/008_wal.ts @@ -0,0 +1,9 @@ +import { Kysely, sql } from '@/deps.ts'; + +export async function up(db: Kysely): Promise { + await sql`PRAGMA journal_mode = WAL`.execute(db); +} + +export async function down(db: Kysely): Promise { + await sql`PRAGMA journal_mode = DELETE`.execute(db); +}