8
pkg/coredata/migrations/20250505T171400Z.sql
Normal file
8
pkg/coredata/migrations/20250505T171400Z.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
ALTER TABLE tasks ADD COLUMN organization_id TEXT REFERENCES organizations(id) ON DELETE CASCADE;
|
||||
|
||||
UPDATE tasks
|
||||
SET organization_id = m.organization_id::text
|
||||
FROM measures m
|
||||
WHERE tasks.measure_id = m.id;
|
||||
|
||||
ALTER TABLE tasks ALTER COLUMN organization_id SET NOT NULL;
|
||||
Reference in New Issue
Block a user