diff options
author | June McEnroe <june@causal.agency> | 2020-07-11 19:36:22 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-11 19:36:22 -0400 |
commit | 80187969f2471931dad161e398c8143b785f86f5 (patch) | |
tree | d8b71f6cdb71e73e7f6f80a45ce3b77c9813046f /server.c | |
parent | Increase line-height (diff) | |
download | scooper-80187969f2471931dad161e398c8143b785f86f5.tar.gz scooper-80187969f2471931dad161e398c8143b785f86f5.zip |
Check database version against a range
Diffstat (limited to '')
-rw-r--r-- | server.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c index 61e23bc..bed5d95 100644 --- a/server.c +++ b/server.c @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) { if (error != SQLITE_ROW) errx(EX_SOFTWARE, "%s", sqlite3_errmsg(db)); int version = sqlite3_column_int(check, 0); - if (version != DatabaseVersion) { + if (version < DatabaseVersionMin || version > DatabaseVersionMax) { errx(EX_DATAERR, "unsupported database version %d", version); } sqlite3_finalize(check); |