diff --git a/internal/database/postgres.go b/internal/database/postgres.go index 81f3e6f..18214fe 100644 --- a/internal/database/postgres.go +++ b/internal/database/postgres.go @@ -71,7 +71,7 @@ func (db *DB) migratePostgres() error { } } else { for i := version; i < len(postgresMigrations); i++ { - db.log.Info().Msgf("Upgrading Database schema to version: %v", i) + db.log.Info().Msgf("Upgrading Database schema to version: %v", i+1) if _, err := tx.Exec(postgresMigrations[i]); err != nil { return errors.Wrap(err, "failed to execute migration #%v", i) } diff --git a/internal/database/sqlite.go b/internal/database/sqlite.go index 3d1f70b..264bc2c 100644 --- a/internal/database/sqlite.go +++ b/internal/database/sqlite.go @@ -39,7 +39,7 @@ func (db *DB) openSQLite() error { } // SQLite has a query planner that uses lifecycle stats to fund optimizations. - // This restricts the SQLite query planner optimizer to only run if sufficient + // This restricts the SQLite query planner optimizer to only run if sufficient // information has been gathered over the lifecycle of the connection. // The SQLite documentation is inconsistent in this regard, // suggestions of 400 and 1000 are both "recommended", so lets use the lower bound. @@ -125,7 +125,7 @@ func (db *DB) migrateSQLite() error { } } else { for i := version; i < len(sqliteMigrations); i++ { - db.log.Info().Msgf("Upgrading Database schema to version: %v", i) + db.log.Info().Msgf("Upgrading Database schema to version: %v", i+1) if _, err := tx.Exec(sqliteMigrations[i]); err != nil { return errors.Wrap(err, "failed to execute migration #%v", i) }