diff --git a/cmd/babylon-staking-indexer/main.go b/cmd/babylon-staking-indexer/main.go index 701578f..cb03ec0 100644 --- a/cmd/babylon-staking-indexer/main.go +++ b/cmd/babylon-staking-indexer/main.go @@ -13,6 +13,7 @@ import ( "github.com/babylonlabs-io/babylon-staking-indexer/internal/clients/btcclient" "github.com/babylonlabs-io/babylon-staking-indexer/internal/config" "github.com/babylonlabs-io/babylon-staking-indexer/internal/db" + dbmodel "github.com/babylonlabs-io/babylon-staking-indexer/internal/db/model" "github.com/babylonlabs-io/babylon-staking-indexer/internal/observability/metrics" "github.com/babylonlabs-io/babylon-staking-indexer/internal/services" "github.com/babylonlabs-io/staking-queue-client/queuemngr" @@ -39,6 +40,11 @@ func main() { log.Fatal().Err(err).Msg(fmt.Sprintf("error while loading config file: %s", cfgPath)) } + err = dbmodel.Setup(ctx, cfg) + if err != nil { + log.Fatal().Err(err).Msg("error while setting up staking db model") + } + // create new db client dbClient, err := db.New(ctx, cfg.Db) if err != nil {