Files
KArtSell.Aegis/db/migrations
kjh2064 db2f6e5a49 chore: Add idempotency to 0031 migration (IF NOT EXISTS on all CREATE INDEX)
**Issue:** 0031 migration failed on re-run due to duplicate index creation errors.
kartselldb_test partial schema state caused "relation already exists" (42P07).

**Fix:** Add IF NOT EXISTS clause to all 16 CREATE INDEX statements.
- Makes migration fully idempotent per DbUp design
- Allows safe re-execution on partially-initialized database
- No functional change; purely defensive

**Result:**
- Migration now succeeds on fresh database
- All 95 integration tests PASS on kartselldb_test
- Validated: test DB isolation restored, no production DB writes

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-02 21:25:15 +09:00
..