From cb4526793d84bad0fa7fef0b2a94350fe58e86a3 Mon Sep 17 00:00:00 2001 From: Till Faelligen Date: Mon, 21 Feb 2022 12:15:56 +0100 Subject: [PATCH] Add missing migrations --- userapi/storage/postgres/storage.go | 1 + .../sqlite3/deltas/2022021012490600_add_account_type.go | 6 ------ userapi/storage/sqlite3/storage.go | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/userapi/storage/postgres/storage.go b/userapi/storage/postgres/storage.go index ac5c59b81..28b43a01d 100644 --- a/userapi/storage/postgres/storage.go +++ b/userapi/storage/postgres/storage.go @@ -45,6 +45,7 @@ func NewDatabase(dbProperties *config.DatabaseOptions, serverName gomatrixserver deltas.LoadIsActive(m) //deltas.LoadLastSeenTSIP(m) deltas.LoadAddAccountType(m) + deltas.LoadAddPolicyVersion(m) if err = m.RunDeltas(db, dbProperties); err != nil { return nil, err } diff --git a/userapi/storage/sqlite3/deltas/2022021012490600_add_account_type.go b/userapi/storage/sqlite3/deltas/2022021012490600_add_account_type.go index 9b058dedd..bcced55fd 100644 --- a/userapi/storage/sqlite3/deltas/2022021012490600_add_account_type.go +++ b/userapi/storage/sqlite3/deltas/2022021012490600_add_account_type.go @@ -4,15 +4,9 @@ import ( "database/sql" "fmt" - "github.com/pressly/goose" - "github.com/matrix-org/dendrite/internal/sqlutil" ) -func init() { - goose.AddMigration(UpAddAccountType, DownAddAccountType) -} - func LoadAddAccountType(m *sqlutil.Migrations) { m.AddMigration(UpAddAccountType, DownAddAccountType) } diff --git a/userapi/storage/sqlite3/storage.go b/userapi/storage/sqlite3/storage.go index 98c244977..44a79c94e 100644 --- a/userapi/storage/sqlite3/storage.go +++ b/userapi/storage/sqlite3/storage.go @@ -46,6 +46,7 @@ func NewDatabase(dbProperties *config.DatabaseOptions, serverName gomatrixserver deltas.LoadIsActive(m) //deltas.LoadLastSeenTSIP(m) deltas.LoadAddAccountType(m) + deltas.LoadAddPolicyVersion(m) if err = m.RunDeltas(db, dbProperties); err != nil { return nil, err }