mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Enable WAL mode on the database
This commit is contained in:
parent
7ec028465e
commit
149f8f6f04
1 changed files with 9 additions and 0 deletions
9
src/db/migrations/008_wal.ts
Normal file
9
src/db/migrations/008_wal.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { Kysely, sql } from '@/deps.ts';
|
||||||
|
|
||||||
|
export async function up(db: Kysely<any>): Promise<void> {
|
||||||
|
await sql`PRAGMA journal_mode = WAL`.execute(db);
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(db: Kysely<any>): Promise<void> {
|
||||||
|
await sql`PRAGMA journal_mode = DELETE`.execute(db);
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue