Files
windmill/backend/migrations/20260408151657_ws_specific_table.down.sql
Diego Imbert d2992af8be refactor: move ws_specific from resource column to separate table (#8766)
* Move ws_specific to separate table

* on delete cascade

* feat: handle ws_specific on resource rename and delete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* is_false never used

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-08 16:10:41 +00:00

13 lines
366 B
SQL

-- Re-add the column to resource
ALTER TABLE resource ADD COLUMN IF NOT EXISTS ws_specific BOOLEAN NOT NULL DEFAULT false;
-- Migrate data back
UPDATE resource SET ws_specific = true
FROM ws_specific ws
WHERE ws.workspace_id = resource.workspace_id
AND ws.item_kind = 'resource'
AND ws.path = resource.path;
-- Drop the table
DROP TABLE IF EXISTS ws_specific;