Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

bug fix: sqlite schema version check shouldn't fail when the schema isn't yet setup for the first time.

spinningbot08b61f907c37
diff --git a/store/sqlite.go b/store/sqlite.go
index 5f4737ae53..e4c8c4f069 100644
--- a/store/sqlite.go
+++ b/store/sqlite.go
@@ -224,7 +224,8 @@ func (db *DB) migrate() error {
db.l.Info(fmt.Sprintf("Current schema version before migration: %d.%d", major, minor))
- if major != MAJOR_SCHEMA_VERSION {
+ // major version is 0 when the store isn't yet setup for the first time.
+ if major != 0 && major != MAJOR_SCHEMA_VERSION {
return fmt.Errorf("current major schema version %d is different from the major schema version %d this release %s expects", major, MAJOR_SCHEMA_VERSION, db.releaseVersion)
}