Fix schema version handling
This commit is contained in:
parent
329f28a737
commit
41949c857a
|
|
@ -10,7 +10,7 @@ import (
|
||||||
var _MIGRATIONS = [...]string{
|
var _MIGRATIONS = [...]string{
|
||||||
`
|
`
|
||||||
create table owner_settings (
|
create table owner_settings (
|
||||||
id integer primary key,
|
id integer primary key default 1,
|
||||||
|
|
||||||
display_name text not null,
|
display_name text not null,
|
||||||
|
|
||||||
|
|
@ -99,6 +99,7 @@ func migrate(db *sql.DB) (MigrateResult, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
result.SchemaVerNew = result.SchemaVerPrev
|
||||||
|
|
||||||
migrationsToRun := _MIGRATIONS[result.SchemaVerPrev:]
|
migrationsToRun := _MIGRATIONS[result.SchemaVerPrev:]
|
||||||
for i, m := range migrationsToRun {
|
for i, m := range migrationsToRun {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue