Commit Graph

3 Commits

Author SHA1 Message Date
Matt effc078918 Make all migration SQL files idempotent for clean prod deploys
Added IF NOT EXISTS, IF EXISTS, and DO $$ EXCEPTION guards to all
migration files from 20260205 onwards so they survive partial application
and work correctly on both fresh databases and existing deployments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 13:09:41 +01:00
Matt 1233cdd22c Fix phase7 FK rename migration: drop old roundId before rename
The pipeline migration (20260213) added stageId columns while keeping
the original roundId columns as nullable. The rename migration tried
to RENAME stageId TO roundId but failed because roundId already existed.
Fix: DROP the old roundId column first, then rename stageId → roundId.
Also restore FK constraints on ConflictOfInterest and TaggingJob.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:16:06 +01:00
Matt 6ca39c976b Competition/Round architecture: full platform rewrite (Phases 1-9)
Replace Pipeline/Stage system with Competition/Round architecture.
New schema: Competition, Round (7 types), JuryGroup, AssignmentPolicy,
ProjectRoundState, DeliberationSession, ResultLock, SubmissionWindow.
New services: round-engine, round-assignment, deliberation, result-lock,
submission-manager, competition-context, ai-prompt-guard.
Full admin/jury/applicant/mentor UI rewrite. AI prompt hardening with
structured prompts, retry logic, and injection detection. All legacy
pipeline/stage code removed. 4 new migrations + seed aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:04:15 +01:00