Skip to content

Commit

Permalink
bug fix: sqlite schema version check shouldn't fail when the schema i…
Browse files Browse the repository at this point in the history
…sn't yet setup for the first time.
  • Loading branch information
spinningbot committed Oct 18, 2021
1 parent b237a48 commit d21ac42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion store/sqlite.go
Expand Up @@ -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)
}

Expand Down

0 comments on commit d21ac42

Please sign in to comment.