From cf3711b2e473724231d7fc9d223099c5b8b9bcb2 Mon Sep 17 00:00:00 2001 From: m Date: Mon, 30 Mar 2026 14:30:40 +0200 Subject: [PATCH] fix: update seed files to use mgmt schema after migration The search_path was changed from kanzlai to mgmt but seed files still referenced the old schema. Also added missing is_spawn and spawn_label columns to mgmt.deadline_rules via direct DB migration. Root cause of timeline 404 / calculate+determine 400: the ruleColumns query selected is_spawn and spawn_label which didn't exist in the mgmt.deadline_rules table, causing all deadline rule queries to fail. --- backend/seed/demo_data.sql | 2 +- backend/seed/seed_upc_timeline.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/seed/demo_data.sql b/backend/seed/demo_data.sql index f8294e4..397d070 100644 --- a/backend/seed/demo_data.sql +++ b/backend/seed/demo_data.sql @@ -2,7 +2,7 @@ -- Creates 1 test tenant, 5 cases with deadlines and appointments -- Run with: psql $DATABASE_URL -f demo_data.sql -SET search_path TO kanzlai, public; +SET search_path TO mgmt, public; -- Demo tenant INSERT INTO tenants (id, name, slug, settings) VALUES diff --git a/backend/seed/seed_upc_timeline.sql b/backend/seed/seed_upc_timeline.sql index de9f234..bda7b0d 100644 --- a/backend/seed/seed_upc_timeline.sql +++ b/backend/seed/seed_upc_timeline.sql @@ -1,6 +1,6 @@ -- UPC Proceeding Timeline: Full event tree with conditional deadlines -- Ported from youpc.org migrations 039 + 040 --- Run against kanzlai schema in flexsiebels Supabase instance +-- Run against mgmt schema in youpc.org Supabase instance -- ======================================== -- 1. Add is_spawn + spawn_label columns