Skip to content

Commit fbe2187

Browse files
committed
Remove test Merkl campaign data (v158 cleanup)
1 parent cef2632 commit fbe2187

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = class RemoveMerklTestData1782900000000 {
2+
name = 'RemoveMerklTestData1782900000000'
3+
4+
// One-off data cleanup for v158.
5+
//
6+
// A test Merkl campaign (creator 0x074105…, campaignId 0xcc3bb1…, targeting the
7+
// Ethena ARM 0xceda2d…, 2026-06-25 → 2026-06-28) was indexed before the real
8+
// campaign creators were configured. This removes the campaign row and resets the
9+
// incentive APY/yield it attributed to that ARM's daily stats. Those four days are
10+
// the only incentive data in the dataset, but we scope by address + date range so
11+
// this can't touch any real campaign data indexed later.
12+
async up(db) {
13+
// Delete the campaign first so a later recompute of those days can't re-attribute it.
14+
await db.query(`DELETE FROM "merkl_campaign" WHERE "creator" = '0x074105fdd39e982b2ffe749a193c942db1046ab9'`)
15+
await db.query(
16+
`UPDATE "arm_daily_stat" SET "incentive_yield" = 0, "incentive_apr" = 0, "incentive_apy" = 0 ` +
17+
`WHERE "address" = '0xceda2d856238aa0d12f6329de20b9115f07c366d' AND "date" BETWEEN '2026-06-25' AND '2026-06-28'`,
18+
)
19+
}
20+
21+
// Irreversible cleanup — the deleted row / original values are not restorable.
22+
async down() {}
23+
}

0 commit comments

Comments
 (0)