Skip to content

fix(DB): Keep Loot-Filled Pumpkin emblem swap replay-safe - #493

Merged
Nyeriah merged 1 commit into
mainfrom
fix/hallows-end-pumpkin-emblem-reapply
Sep 12, 2026
Merged

Nyeriah merged 1 commit into
mainfrom
fix/hallows-end-pumpkin-emblem-reapply

Conversation

@Nyeriah

@Nyeriah Nyeriah commented Sep 12, 2026 •

Copy link
Copy Markdown
Member

Problem

On a realm with ProgressionSystem.ReapplyUpdates = 1, Ulduar is disabled again after every restart, along with Onyxia's Lair, Trial of the Crusader and Trial of the Champion.

The cause is a duplicate-key error in the Hallow's End loot swap added in #492:

  • progression_1_19_hallows_end_down.sql deletes items 49426, 49128, 49126 from the Loot-Filled Pumpkin (54516) and re-inserts the Emblem of Frost row.
  • progression_80_1_hallows_end.sql then runs UPDATE item_loot_template SET Item = 40753 WHERE Entry = 54516 AND Item = 49426.

The first replay works. On the next one, the converted 40753 row is still there because the down file does not clear it, so the UPDATE collides with the primary key (Entry, Item):

ERROR 1062 (23000): Duplicate entry '54516-40753' for key 'item_loot_template.PRIMARY'

The updater treats a failed file as fatal and stops, so every file sorting after progression_80_1_hallows_end.sql is skipped. That includes progression_80_2_disables.sql and progression_80_3_disables.sql, which are the only files that lift the map disables for those instances. progression_0_disables.sql sorts early and runs fine, so it re-inserts the Ulduar disable on every restart with nothing left to remove it.

Observed on an affected world DB: 174 progression_* rows in updates, ending at progression_80_1_epic_gems_down.sql, with the next 23 files missing starting exactly at progression_80_1_hallows_end.sql, and both 40753 and 49426 present on entry 54516.

The Heart-Shaped Box swap in progression_80_1_love_in_air.sql is not affected: its down file deletes the whole entry rather than a list of items, so the converted row is cleared first.

Fix

Add 40753 to the DELETE in progression_1_19_hallows_end_down.sql so the slot is free when the swap runs again.

Tests

Replayed every enabled bracket's SQL in filename order against a world DB inside a transaction:

  • Before the fix: one error, the duplicate key above.
  • After the fix, three consecutive passes: no errors, entries 54516 and 54537 both end with Emblem of Valor only, and disables ends with no row for map 603.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated item loot availability by removing item 40753 from the specified Halloween event loot entry.

progression_80_1_hallows_end.sql swaps the pumpkin's Emblem of Frost row
for Emblem of Valor with an UPDATE, but the down file only clears 49426,
49128 and 49126. On a realm running ReapplyUpdates the converted 40753
row survives, the replay re-inserts 49426, and the UPDATE then hits a
duplicate key on item_loot_template (Entry, Item).

The updater aborts on the failing file, so every file sorting after it is
skipped, including progression_80_2_disables.sql. Ulduar and the 80_3
instances end up disabled again by progression_0_disables.sql on every
restart.

Clear 40753 along with the other rows so the swap can run again.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 0965089f-1702-426d-845f-686e9a6e4ba7

📥 Commits

Reviewing files that changed from the base of the PR and between 33d1a6b and b3fd3c2.

📒 Files selected for processing (1)
  • src/Bracket_80_1_1/sql/world/progression_1_19_hallows_end_down.sql

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The rollback SQL now removes item 40753 from item_loot_template entry 54516, together with the existing item IDs.

Changes

Hallow's End loot cleanup

Layer / File(s) Summary
Extend loot deletion
src/Bracket_80_1_1/sql/world/progression_1_19_hallows_end_down.sql
The DELETE statement for entry 54516 now includes item 40753.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to b3fd3

The migration replay fix is narrowly scoped and restores reliable progression processing after restarts.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: making the Loot-Filled Pumpkin emblem swap replay-safe through a database fix.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/hallows-end-pumpkin-emblem-reapply

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Nyeriah
Nyeriah merged commit fb2faa9 into main Sep 12, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant