fix(db): move clan_members table definition before data migrations (closes #82) - #113
fix(db): move clan_members table definition before data migrations (closes #82)#113trexfr-ops wants to merge 2 commits into
Conversation
|
Resolved the review finding in commit
|
Code Review ✅ Approved 1 resolved / 1 findingsReorders schema definitions and wraps database migration scripts in an atomic transaction to prevent missing table errors. The psql meta-command issue was successfully resolved. ✅ 1 resolved✅ Bug: psql meta-command \set breaks migrate.ts execution path
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Description
Closes #82
This PR fixes the table creation ordering in
api/schema.sqlso thatclan_members,characters.clan_id, andclan_requestsare defined before the data migration CTEs that reference them.Key Changes
\set ON_ERROR_STOP onat the beginning ofapi/schema.sqlto ensure execution halts if any statement fails.clan_memberstable creation,ALTER TABLE characters ADD COLUMN IF NOT EXISTS clan_id,clan_requests, and their associated indexes directly after theclanstable definition./claim #82
0x32BB3df5B74a594956a0f33Bc353511Fa759FCa4LPnftYop8yhRNQZstysT3vuJf3XkpQWKTC8Xo39uq9LoaM2rQEkgaaSfuThqHZTd18yGdJSXffkLwMbc1qpyu6866qcgt26sqw4dn2mlmp8d0yc657fuedkvDDMU6D9TCE3BhqqYyy7MUZQD7JhfL39FpE