From af5e7495f3993c52573432cadde12169d5c05e62 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 15 Nov 2023 10:50:30 -0300 Subject: Add support for multi-file C project - have dynamic discovered dependencies via `mkdeps.hs`, and also move the listing of JavaScript files to it. - copy over stub C files for setting up the project skeleton. --- src/sql/config.sql | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/sql/config.sql (limited to 'src/sql') diff --git a/src/sql/config.sql b/src/sql/config.sql new file mode 100644 index 0000000..53eb279 --- /dev/null +++ b/src/sql/config.sql @@ -0,0 +1,34 @@ +; "Litestream requires periodic but short write locks on the database when +; checkpointing occurs": +; https://litestream.io/tips/#busy-timeout +PRAGMA busy_timeout = 5000; + +; "Litestream only works with the SQLite WAL journaling mode": +; https://litestream.io/tips/#wal-journal-mode +PRAGMA journal_mode = WAL; + +; "(...) change the synchronous mode to NORMAL (it typically defaults to FULL)": +; https://litestream.io/tips/#synchronous-pragma +; "WAL mode is safe from corruption with synchronous=NORMAL": +; https://www.sqlite.org/pragma.html#pragma_synchronous +PRAGMA synchronous = NORMAL; + +; "(...) can perform a checkpoint in between Litestream-initiated checkpoints +; and cause Litestream to miss a WAL file": +; https://litestream.io/tips/#disable-autocheckpoints-for-high-write-load-servers +PRAGMA wal_autocheckpoint = 0; + +; "This pragma does a low-level formatting and consistency check of the +; database": +; https://www.sqlite.org/pragma.html#pragma_integrity_check +PRAGMA integrity_check; + +; "The foreign_key_check pragma checks the database, or the table called + \"table-name\", for foreign key constraints that are violated": +; https://www.sqlite.org/pragma.html#pragma_foreign_key_check +PRAGMA foreign_key_check; + + +CREATE TABLE IF NO EXISTS migrations ( + name TEXT PRIMARY KEY +); -- cgit v1.2.3