Files
windmill/backend/migrations/20250811171024_add_usr_added_via.up.sql
Alexander Petric 58975b58dc feat: instance groups workspace (#6380)
* feat: instancd groups mapping to workspace

* npm run check

* nits

* improve apis

* sqlx prepare and ee-repo ref

* adding workspace assignment in groups page

* nits

* correct rollback

* sqlx

* ee repo ref

* revert accidental ee-repo-ref commit to main

* ee repo ref

* revert accidental ee-repo-ref commit to main
2025-08-14 09:06:00 +00:00

9 lines
430 B
SQL

-- Add added_via column to track how users were added to workspaces
-- NULL = manual addition
-- {"source": "domain", "domain": "company.com"} = domain auto-add
-- {"source": "instance_group", "group": "developers", "role": "developer"} = instance group auto-add
ALTER TABLE usr ADD COLUMN added_via jsonb DEFAULT NULL;
-- Add index for efficient queries on added_via
CREATE INDEX idx_usr_added_via ON usr USING gin (added_via);