fix: Migration 024 - remove problematic FK constraints created_by/updated_by
Goal type definitions are global system entities, not user-specific. System types seeded in migration cannot have created_by FK. Changes: - Remove created_by/updated_by columns from goal_type_definitions - Update CREATE/UPDATE endpoints to not use these fields - Migration now runs cleanly on container start - No manual intervention needed for production deployment
This commit is contained in:
1 parent
b3cc588293
commit
a039a0fad3
2 files changed
+4
-10
No files matched your search
@@ -36,9 +36,7 @@ CREATE TABLE IF NOT EXISTS goal_type_definitions (
|
||||
|
||||
-- Audit
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
updated_at TIMESTAMP DEFAULT NOW(),
|
||||
created_by UUID REFERENCES profiles(id) ON DELETE SET NULL,
|
||||
updated_by UUID REFERENCES profiles(id) ON DELETE SET NULL
|
||||
updated_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_goal_type_definitions_active ON goal_type_definitions(is_active) WHERE is_active = true;
|
||||
|
||||
Reference in new issue
Block a user