Fix schema init crash on existing DBs with old verification_codes table
Move auth-related indexes into migrations so they run after column additions. Previously CREATE INDEX on verification_codes(identifier) would fail because the old table still had the email column. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -61,5 +61,3 @@ CREATE TABLE IF NOT EXISTS verification_codes (
|
||||
CREATE INDEX IF NOT EXISTS idx_slots_event ON slots(event_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_claims_slot ON claims(slot_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_rsvps_event ON rsvps(event_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_sessions_user ON sessions(user_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_verification_codes_identifier ON verification_codes(identifier);
|
||||
|
||||
Reference in New Issue
Block a user