13 lines
750 B
SQL
13 lines
750 B
SQL
-- Build runners (INF-CI-{CLD,OPR}-{STD,BUS,ENT}): a dedicated build machine per
|
|
-- customer, never shared, registered with the customer's Managed Git
|
|
-- instance. Kind `ci-runner`; its url is the Git instance it serves.
|
|
--
|
|
-- Runners are priced per runner, so one Git instance may have several: the
|
|
-- (tenant, kind, url) uniqueness of 0012 now holds for kind `git` only.
|
|
ALTER TABLE managed_services DROP CONSTRAINT managed_services_kind_check;
|
|
ALTER TABLE managed_services ADD CONSTRAINT managed_services_kind_check
|
|
CHECK (kind IN ('git', 'ci-runner'));
|
|
|
|
ALTER TABLE managed_services DROP CONSTRAINT managed_services_tenant_id_kind_url_key;
|
|
CREATE UNIQUE INDEX managed_services_git_url ON managed_services (tenant_id, url) WHERE kind = 'git';
|