mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-15 00:02:56 +00:00
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
9 lines
568 B
SQL
9 lines
568 B
SQL
-- A data table role is a Postgres login on one cluster: Windmill's own ('instance'), or the external
|
|
-- instance cluster ('external_instance'). Role names are the cluster's own key, so they are unique
|
|
-- per cluster rather than across the instance.
|
|
ALTER TABLE datatable_role
|
|
ADD COLUMN cluster VARCHAR(20) NOT NULL DEFAULT 'instance'
|
|
CHECK (cluster IN ('instance', 'external_instance'));
|
|
ALTER TABLE datatable_role DROP CONSTRAINT datatable_role_name_key;
|
|
ALTER TABLE datatable_role ADD CONSTRAINT datatable_role_cluster_name_key UNIQUE (cluster, name);
|