|
12 | 12 |
|
13 | 13 | ### Duplicate-Pattern Checklist |
14 | 14 |
|
15 | | -- repeated `select ... from game.item_defs where name = ... and enabled` in `game.authored_item` and the item stat helpers currently redefined in `supabase/migrations/2026032301_add_item_defs_table.sql` |
| 15 | +- repeated `select ... from game.item_defs where name = ... and enabled` in `game.authored_item` and the item stat helpers currently redefined in `supabase/migrations/20260323015_add_item_defs_table.sql` |
16 | 16 | - repeated weighted running-sum selection CTEs in `game.random_enemy_loadout_from_table`, `game.random_loot_items_from_table`, and both extraction/default encounter branches in `game.generate_raid_encounter` from `supabase/migrations/2026032302_add_authored_loot_and_encounter_tables.sql` |
17 | 17 | - repeated joins from authored variant item tables back to `game.item_defs` in enemy-loadout and loot-table JSON generation in `supabase/migrations/2026032302_add_authored_loot_and_encounter_tables.sql` |
18 | 18 | - repeated name-based stat lookups in combat/action code, with the latest effective `game.perform_raid_action` definition still in `supabase/migrations/2026032205_remove_gun_malfunctions_and_clear_jams.sql` |
|
21 | 21 |
|
22 | 22 | `rg -n "create or replace function game\.(authored_item|weapon_magazine_capacity|backpack_capacity|weapon_armor_penetration|armor_damage_reduction|weapon_supports_single_shot|weapon_supports_burst_fire|weapon_supports_full_auto|weapon_burst_attack_penalty|roll_weapon_damage_d20|random_enemy_loadout_from_table|random_loot_items_from_table|generate_raid_encounter|perform_raid_action)" supabase/migrations` currently resolves the latest definitions to: |
23 | 23 |
|
24 | | -- `supabase/migrations/2026032301_add_item_defs_table.sql` for `game.authored_item` and the item stat helper layer |
| 24 | +- `supabase/migrations/20260323015_add_item_defs_table.sql` for `game.authored_item` and the item stat helper layer |
25 | 25 | - `supabase/migrations/2026032302_add_authored_loot_and_encounter_tables.sql` for authored weighted selection and encounter generation |
26 | 26 | - `supabase/migrations/2026032205_remove_gun_malfunctions_and_clear_jams.sql` for the latest effective `game.perform_raid_action` |
27 | 27 |
|
|
36 | 36 |
|
37 | 37 | **Files:** |
38 | 38 | - Modify: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/docs/plans/2026-03-23-item-key-lookups-and-shared-selection-helpers.md` |
39 | | -- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032301_add_item_defs_table.sql` |
| 39 | +- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/20260323015_add_item_defs_table.sql` |
40 | 40 | - Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032302_add_authored_loot_and_encounter_tables.sql` |
41 | 41 | - Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032205_remove_gun_malfunctions_and_clear_jams.sql` |
42 | 42 |
|
@@ -74,7 +74,7 @@ git commit -m "docs: inventory duplicate lookup patterns" |
74 | 74 |
|
75 | 75 | **Files:** |
76 | 76 | - Create: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032303_add_item_lookup_helpers.sql` |
77 | | -- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032301_add_item_defs_table.sql` |
| 77 | +- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/20260323015_add_item_defs_table.sql` |
78 | 78 |
|
79 | 79 | **Step 1: Write the failing verification queries in migration notes** |
80 | 80 |
|
@@ -122,7 +122,7 @@ git commit -m "feat: add canonical item lookup helpers" |
122 | 122 |
|
123 | 123 | **Files:** |
124 | 124 | - Modify: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032303_add_item_lookup_helpers.sql` |
125 | | -- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032301_add_item_defs_table.sql` |
| 125 | +- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/20260323015_add_item_defs_table.sql` |
126 | 126 |
|
127 | 127 | **Step 1: Write parity checks** |
128 | 128 |
|
@@ -235,7 +235,7 @@ git commit -m "refactor: share weighted selection logic across authored generato |
235 | 235 |
|
236 | 236 | **Files:** |
237 | 237 | - Create: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032305_add_internal_item_key_usage.sql` |
238 | | -- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032301_add_item_defs_table.sql` |
| 238 | +- Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/20260323015_add_item_defs_table.sql` |
239 | 239 | - Reference: `C:/Users/james/source/repos/extractor-shooter-light/.worktrees/data-driven-authoring/supabase/migrations/2026032302_add_authored_loot_and_encounter_tables.sql` |
240 | 240 |
|
241 | 241 | **Step 1: Define the compatibility rule** |
|
0 commit comments