aboutsummaryrefslogtreecommitdiff
path: root/sql/README.txt
diff options
context:
space:
mode:
Diffstat (limited to 'sql/README.txt')
-rw-r--r--sql/README.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/README.txt b/sql/README.txt
new file mode 100644
index 0000000..26f782a
--- /dev/null
+++ b/sql/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