From 857e48c2ee7ddad0b018809070725f53af31808f Mon Sep 17 00:00:00 2001 From: Sean McGary Date: Wed, 15 Jan 2025 12:07:46 -0600 Subject: [PATCH] fix: add missing insert to migration --- pkg/postgres/migrations/202501151039_rewardsClaimed/up.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/postgres/migrations/202501151039_rewardsClaimed/up.go b/pkg/postgres/migrations/202501151039_rewardsClaimed/up.go index de199b88..86335c2e 100644 --- a/pkg/postgres/migrations/202501151039_rewardsClaimed/up.go +++ b/pkg/postgres/migrations/202501151039_rewardsClaimed/up.go @@ -30,6 +30,7 @@ func (m *Migration) Up(db *sql.DB, grm *gorm.DB, cfg *config.Config) error { return res.Error } query = ` + insert into rewards_claimed (root, token, claimed_amount, earner, claimer, recipient, transaction_hash, block_number, log_index) select concat('0x', ( SELECT lower(string_agg(lpad(to_hex(elem::int), 2, '0'), '')) @@ -48,6 +49,7 @@ func (m *Migration) Up(db *sql.DB, grm *gorm.DB, cfg *config.Config) error { tl.address = @rewardsCoordinatorAddress and tl.event_name = 'RewardsClaimed' order by tl.block_number asc + on conflict do nothing ` contractAddresses := cfg.GetContractsMapForChain() res = grm.Exec(query, sql.Named("rewardsCoordinatorAddress", contractAddresses.RewardsCoordinator))