Skip to content

fix(DB): Use creature.id column instead of nonexistent id1/id2/id3#480

Merged
Nyeriah merged 1 commit into
mainfrom
fix/creature-id-column
Jun 21, 2026
Merged

fix(DB): Use creature.id column instead of nonexistent id1/id2/id3#480
Nyeriah merged 1 commit into
mainfrom
fix/creature-id-column

Conversation

@Nyeriah

@Nyeriah Nyeriah commented Jun 21, 2026

Copy link
Copy Markdown
Member

Problem

Applying the module fails on world DB import:

ERROR 1054 (42S22) at line 2: Unknown column 'id1' in 'where clause'
Applying of file '.../Bracket_0/sql/world/progression_0_creature.sql' ... failed!

The acore_world.creature spawn table uses a single id column (no id1/id2/id3). Commit "Change id to id1 for creature queries" (#114) rewrote every module creature query to the id1/id2/id3 schema, which this core does not have, so the world auto-updater aborts.

Fix

  • Revert id1 -> id in all creature UPDATE/DELETE/SELECT statements (29 files).
  • Drop id2/id3 from the creature INSERT column lists and remove the corresponding 0, 0 values from each row (brewfest, love_in_air, kazzak).

zoneId/areaId and the rest of the columns already exist in the schema and are unchanged.

Verification

Validated against a live acore_world DB: the originally failing UPDATE and a fixed INSERT (in a rolled-back transaction) both execute without error. Column count matches value count for every edited INSERT.

Summary by CodeRabbit

  • Bug Fixes
    • Corrected creature visibility and phasing issues across multiple game progression stages, ensuring NPCs and world bosses appear and disappear at the correct times during server progression.
    • Fixed NPC positioning and spawn behavior for various creatures throughout different raid tiers and world events.

The creature spawn table uses a single `id` column. Commit #114 switched
all module creature queries to `id1`/`id2`/`id3`, which do not exist in the
acore_world.creature schema, so the world auto-updater aborted with
"Unknown column 'id1' in 'where clause'".

Revert id1 -> id across all creature UPDATE/DELETE/SELECT statements and
drop the id2/id3 columns (and their values) from the creature INSERTs.

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

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c5e5e25-5436-4e48-adfc-c03fc3becdcb

📥 Commits

Reviewing files that changed from the base of the PR and between 441cb8a and b3200e1.

📒 Files selected for processing (29)
  • src/Bracket_0/sql/world/progression_0_creature.sql
  • src/Bracket_1_19/sql/world/progression_1_19_brewfest.sql
  • src/Bracket_1_19/sql/world/progression_1_19_love_in_air.sql
  • src/Bracket_60_2_1/sql/world/progression_0_creature_WorldBosses_down_1.sql
  • src/Bracket_60_2_1/sql/world/progression_60_2_1_kazzak.sql
  • src/Bracket_60_2_1/sql/world/progression_60_2_1_the_masquerade.sql
  • src/Bracket_60_3_1/sql/world/progression_0_creature_WorldBosses_down_2.sql
  • src/Bracket_61_64/sql/world/progression_60_2_1_kazzak_down.sql
  • src/Bracket_61_64/sql/world/progression_61_64_Phase5_disables.sql
  • src/Bracket_61_64/sql/world/progression_61_64_creature_disable_token_vendor.sql
  • src/Bracket_61_64/sql/world/progression_61_64_faction_ShatariSkyguard.sql
  • src/Bracket_70_1_1/sql/world/progression_0_creature_UngoroCultists_down.sql
  • src/Bracket_70_1_2/sql/world/progression_0_creature_KarazhanNPCs_down.sql
  • src/Bracket_70_2_1/sql/world/progression_0_creature_WorldBosses_down_3.sql
  • src/Bracket_70_2_1/sql/world/progression_61_64_down_70_2_1.sql
  • src/Bracket_70_3_1/sql/world/progression_70_3_1_down.sql
  • src/Bracket_70_3_2/sql/world/progression_61_64_faction_ShatariSkyguard_down.sql
  • src/Bracket_70_4_1/sql/world/progression_61_64_down_70_4_1.sql
  • src/Bracket_70_6_1/sql/world/progression_61_64_Phase5_disables_down.sql
  • src/Bracket_71_74/sql/world/progression_0_creature_Gangrenous_down.sql
  • src/Bracket_80_1_1/sql/world/progression_1_19_brewfest_down.sql
  • src/Bracket_80_1_1/sql/world/progression_1_19_love_in_air_down.sql
  • src/Bracket_80_1_1/sql/world/progression_60_2_the_masquerade_down.sql
  • src/Bracket_80_1_1/sql/world/progression_80_1_creature.sql
  • src/Bracket_80_2/sql/world/progression_80_2_creature.sql
  • src/Bracket_80_3/sql/world/progression_80_3_creature.sql
  • src/Bracket_80_4_1/sql/world/progression_0_creature_undercity_guardian_down.sql
  • src/Bracket_80_4_1/sql/world/progression_80_4_1_creature.sql
  • src/Bracket_80_4_1/sql/world/progression_80_4_1_frozo_the_renowned.sql

📝 Walkthrough

Walkthrough

Across 29 SQL migration files spanning Brackets 0 through 80_4_1, all references to the creature.id1 column in WHERE predicates and INSERT column lists are replaced with creature.id. This covers phasemask UPDATE statements, DELETE conditions, and INSERT schemas for creature spawns, phase-visibility toggles, and NPC remappings in both forward and rollback scripts.

Changes

id1 → id Column Fix Across Progression SQL Migrations

Layer / File(s) Summary
Main progression_0_creature.sql up-script
src/Bracket_0/sql/world/progression_0_creature.sql
Switches Gangrenus, Karazhan NPC, Un'Goro cultist, Vault of Archavon boss, World Boss hide statements, and Kor'Kron Overseer replacement from creature.id1 to creature.id.
Creature spawn up-scripts: DELETE + INSERT column fix
src/Bracket_1_19/sql/world/progression_1_19_brewfest.sql, src/Bracket_1_19/sql/world/progression_1_19_love_in_air.sql, src/Bracket_60_2_1/sql/world/progression_60_2_1_kazzak.sql, src/Bracket_60_2_1/sql/world/progression_60_2_1_the_masquerade.sql
Replaces id1/id2/id3 column references in DELETE predicates and INSERT column lists with the single id column for Brewfest, Love in the Air, Kazzak, Lady Katrana Prestor, and Highlord Bolvar Fordragon spawns.
Bracket phasemask UPDATE fixes (Brackets 60–80)
src/Bracket_60_2_1/sql/world/progression_0_creature_WorldBosses_down_1.sql, src/Bracket_60_3_1/..., src/Bracket_61_64/sql/world/progression_61_64_Phase5_disables.sql, src/Bracket_61_64/sql/world/progression_61_64_creature_disable_token_vendor.sql, src/Bracket_61_64/sql/world/progression_61_64_faction_ShatariSkyguard.sql, src/Bracket_70_2_1/..., src/Bracket_70_3_1/..., src/Bracket_70_4_1/..., src/Bracket_80_1_1/sql/world/progression_80_1_creature.sql, src/Bracket_80_2/..., src/Bracket_80_3/..., src/Bracket_80_4_1/sql/world/progression_80_4_1_creature.sql, src/Bracket_80_4_1/sql/world/progression_80_4_1_frozo_the_renowned.sql
Switches WHERE id1 IN (...) to WHERE id IN (...) across all phasemask-setting UPDATE statements for world bosses, token vendors, SSO NPCs, ShatariSkyguard, and Wrath-era creatures.
Down/rollback script fixes
src/Bracket_61_64/sql/world/progression_60_2_1_kazzak_down.sql, src/Bracket_70_1_1/..., src/Bracket_70_1_2/..., src/Bracket_70_3_2/..., src/Bracket_70_6_1/sql/world/progression_61_64_Phase5_disables_down.sql, src/Bracket_71_74/..., src/Bracket_80_1_1/sql/world/progression_1_19_brewfest_down.sql, src/Bracket_80_1_1/sql/world/progression_1_19_love_in_air_down.sql, src/Bracket_80_1_1/sql/world/progression_60_2_the_masquerade_down.sql, src/Bracket_80_4_1/sql/world/progression_0_creature_undercity_guardian_down.sql
Applies the same id1id column correction to all rollback scripts covering Kazzak, Un'Goro cultists, Karazhan NPCs, Gangrenous, ShatariSkyguard, Phase5 disables, Brewfest, Love in the Air, Masquerade, and Undercity Guardian.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 The column called id1 has vanished from sight,
replaced by plain id to set the world right.
From Bracket_0 through the halls of ICC,
each WHERE clause now points where it ought to be.
No more phantom fields in the dungeon below —
the rabbit refactored, and onward we go! 🌿

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/creature-id-column

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

@Nyeriah Nyeriah merged commit 47ff0b5 into main Jun 21, 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