Simplify routing to award assignment, seed all CSV entries, fix category mapping
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m3s
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m3s
- Remove RoutingRule model and routing engine (replaced by direct award assignment) - Simplify RoutingMode enum: PARALLEL/POST_MAIN → SHARED, keep EXCLUSIVE - Remove routing router, routing-rules-editor, and related tests - Update pipeline, award, and notification code to remove routing references - Seed: include all CSV entries (no filtering/dedup), AI screening handles duplicates - Seed: fix non-breaking space (U+00A0) bug in category/issue mapping - Stage filtering: add duplicate detection that flags projects for admin review Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- Simplify RoutingMode enum: remove POST_MAIN, rename PARALLEL → SHARED
|
||||
-- Drop RoutingRule table (routing is now handled via award assignment)
|
||||
|
||||
-- 1. Update existing PARALLEL values to SHARED, POST_MAIN to SHARED
|
||||
UPDATE "Track" SET "routingMode" = 'PARALLEL' WHERE "routingMode" = 'POST_MAIN';
|
||||
|
||||
-- 2. Rename PARALLEL → SHARED in the enum
|
||||
ALTER TYPE "RoutingMode" RENAME VALUE 'PARALLEL' TO 'SHARED';
|
||||
|
||||
-- 3. Remove POST_MAIN from the enum
|
||||
-- PostgreSQL doesn't support DROP VALUE directly, so we recreate the enum
|
||||
-- Since we already converted POST_MAIN values to PARALLEL (now SHARED), this is safe
|
||||
|
||||
-- Create new enum without POST_MAIN
|
||||
-- Actually, since we already renamed PARALLEL to SHARED and converted POST_MAIN rows,
|
||||
-- we just need to remove the POST_MAIN value. PostgreSQL 13+ doesn't support dropping
|
||||
-- enum values natively, but since all rows are already migrated, we can:
|
||||
CREATE TYPE "RoutingMode_new" AS ENUM ('SHARED', 'EXCLUSIVE');
|
||||
|
||||
ALTER TABLE "Track"
|
||||
ALTER COLUMN "routingMode" TYPE "RoutingMode_new"
|
||||
USING ("routingMode"::text::"RoutingMode_new");
|
||||
|
||||
DROP TYPE "RoutingMode";
|
||||
ALTER TYPE "RoutingMode_new" RENAME TO "RoutingMode";
|
||||
|
||||
-- 4. Drop the RoutingRule table (no longer needed)
|
||||
DROP TABLE IF EXISTS "RoutingRule";
|
||||
Reference in New Issue
Block a user