This commit is contained in:
tsmethurst 2021-09-01 11:13:01 +02:00
parent 7b01304dac
commit 55a9b8553f

View file

@ -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{