Skip to content

Commit

Permalink
Add a few suggested pragmas to the db.
Browse files Browse the repository at this point in the history
  • Loading branch information
liffiton committed Sep 12, 2024
1 parent 6f088ea commit d55436c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/gened/migrations/20240911--new_pragmas.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- SPDX-FileCopyrightText: 2024 Mark Liffiton <[email protected]>
--
-- SPDX-License-Identifier: AGPL-3.0-only

PRAGMA synchronous = NORMAL; -- recommended setting for WAL mode
PRAGMA busy_timeout = 5000; -- to avoid immediate errors on some blocked writes

4 changes: 3 additions & 1 deletion src/gened/schema_common.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
--
-- SPDX-License-Identifier: AGPL-3.0-only

PRAGMA journal_mode = WAL; -- to enable Litestream backups
PRAGMA journal_mode = WAL; -- to enable Litestream backups
PRAGMA synchronous = NORMAL; -- recommended setting for WAL mode
PRAGMA busy_timeout = 5000; -- to avoid immediate errors on some blocked writes

PRAGMA foreign_keys = OFF; -- just for not worrying about table deletion order

Expand Down

0 comments on commit d55436c

Please sign in to comment.