From 2344f2e4ff8b725228055357420f522efe45dc01 Mon Sep 17 00:00:00 2001 From: Matt Date: Fri, 10 Apr 2026 13:57:36 -0400 Subject: [PATCH] fix: drop stale unique index blocking per-category evaluation forms The category migration used DROP CONSTRAINT but the index was created with CREATE UNIQUE INDEX, so it was never actually removed. This prevented saving business concept criteria when startup criteria already existed at the same version number. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../migration.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 prisma/migrations/20260410000000_fix_evaluation_form_unique_index/migration.sql diff --git a/prisma/migrations/20260410000000_fix_evaluation_form_unique_index/migration.sql b/prisma/migrations/20260410000000_fix_evaluation_form_unique_index/migration.sql new file mode 100644 index 0000000..1107049 --- /dev/null +++ b/prisma/migrations/20260410000000_fix_evaluation_form_unique_index/migration.sql @@ -0,0 +1,5 @@ +-- Fix: the category migration used DROP CONSTRAINT to remove the old +-- (roundId, version) uniqueness rule, but it was created as a UNIQUE INDEX +-- (not a constraint) by an earlier migration, so it was never actually dropped. +-- This blocks per-category forms from sharing a version number. +DROP INDEX IF EXISTS "EvaluationForm_roundId_version_key";