diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-02-28 14:08:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-28 14:08:06 +0200 |
commit | ebfaf8c0903c16cabd3ba76d4ca802c022ce9a29 (patch) | |
tree | fb954a5e3aa8ed2e04a02182becd31576f72ad14 /database | |
parent | 541839ebd641dcf117be014aeb752be2733ec3b9 (diff) |
Setting a DB version (to make future schema changes / migration easier) (#12249)
Diffstat (limited to 'database')
-rw-r--r-- | database/sqlite/sqlite_functions.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/database/sqlite/sqlite_functions.c b/database/sqlite/sqlite_functions.c index f1585b661b..bc1da9fb53 100644 --- a/database/sqlite/sqlite_functions.c +++ b/database/sqlite/sqlite_functions.c @@ -2,6 +2,8 @@ #include "sqlite_functions.h" +#define DB_METADATA_VERSION "1" + const char *database_config[] = { "PRAGMA auto_vacuum=incremental; PRAGMA synchronous=1 ; PRAGMA journal_mode=WAL; PRAGMA temp_store=MEMORY;", "PRAGMA journal_size_limit=16777216;", @@ -52,6 +54,7 @@ const char *database_config[] = { "INSERT INTO chart_hash_map (chart_id, hash_id) values (new.chart_id, new.hash_id) " "on conflict (chart_id, hash_id) do nothing; END; ", + "PRAGMA user_version="DB_METADATA_VERSION";", NULL }; |