fix db schema version check
authorJustin Wind <justin.wind+git@gmail.com>
Mon, 16 Aug 2021 18:42:50 +0000 (11:42 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Mon, 16 Aug 2021 18:42:50 +0000 (11:42 -0700)
src/db/base.js

index 21e26642fad6ab703ef5c0a7a094180b4b3d19bc..95c901068092eb93ea8218cca55e775b1ffa5f10 100644 (file)
@@ -96,7 +96,7 @@ class Database {
     const current = svh.schemaVersionObjectToNumber(currentSchema);
     const min = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.min);
     const max = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.max);
-    if (min >= current && max <= current) {
+    if (current >= min && current <= max) {
       this.logger.debug(_scope, 'schema supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported });
     } else {
       this.logger.error(_scope, 'schema not supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported });