Fix schema version handling

This commit is contained in:
soup 2024-11-15 12:02:43 -05:00
parent 329f28a737
commit 41949c857a

View file

@ -10,7 +10,7 @@ import (
var _MIGRATIONS = [...]string{
`
create table owner_settings (
id integer primary key,
id integer primary key default 1,
display_name text not null,
@ -99,6 +99,7 @@ func migrate(db *sql.DB) (MigrateResult, error) {
if err != nil {
return result, err
}
result.SchemaVerNew = result.SchemaVerPrev
migrationsToRun := _MIGRATIONS[result.SchemaVerPrev:]
for i, m := range migrationsToRun {