From 46c653293381dcc1188013d3e2c3f7587a199dc4 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Fri, 10 Oct 2025 15:14:02 -0300 Subject: organize database configs and schema files + compilation guards --- sqlite/README.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 sqlite/README.txt (limited to 'sqlite/README.txt') diff --git a/sqlite/README.txt b/sqlite/README.txt new file mode 100644 index 0000000..26f782a --- /dev/null +++ b/sqlite/README.txt @@ -0,0 +1,10 @@ + The query manager will properly initialize and upgrade the database schema +based on files in this folder. The initial schema should be in `schema.sql` and +upgrades should be in `upgrade-N.sql` where N is a number starting from 1. The +`upgrade-N.sql` file should take the database from version N to N + 1. + The only restriction to these files is that they can't have transaction +statements ("BEGIN", "ROLLBACK", "COMMIT") because the query manager will +already bundle them into a transaction that also sets `user_version`, and +and nested transactions aren't allowed. + The current database version can be retrieved with the "PRAGMA user_version" +query in the SQLite shell. \ No newline at end of file -- cgit v1.2.3