summary refs log tree commit diff
path: root/server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-11 19:36:22 -0400
committerJune McEnroe <june@causal.agency>2020-07-11 19:36:22 -0400
commit80187969f2471931dad161e398c8143b785f86f5 (patch)
treed8b71f6cdb71e73e7f6f80a45ce3b77c9813046f /server.c
parentIncrease line-height (diff)
downloadscooper-80187969f2471931dad161e398c8143b785f86f5.tar.gz
scooper-80187969f2471931dad161e398c8143b785f86f5.zip
Check database version against a range
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
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);