diff --git a/internal/db/bundb/bundb.go b/internal/db/bundb/bundb.go index 2a622020..f2e83887 100644 --- a/internal/db/bundb/bundb.go +++ b/internal/db/bundb/bundb.go @@ -155,11 +155,12 @@ func NewBunDBService(ctx context.Context, c *config.Config, log *logrus.Logger) conn.RegisterModel(t) } - accounts := &accountDB{config: c, conn: conn, cache: cache.NewAccountCache()} if err := doMigration(ctx, conn.DB, log); err != nil { return nil, fmt.Errorf("db migration error: %s", err) } + accounts := &accountDB{config: c, conn: conn, cache: cache.NewAccountCache()} + ps := &bunDBService{ Account: accounts, Admin: &adminDB{