Files
tenant-registry/migrations/0013_managed_services_ci_runner.up.sql
T
sharang 8753305ad4
ci / shared (push) Successful in 13s
ci / test (push) Successful in 24m26s
ci / image (push) Successful in 36s
feat(services): build runners INF-CI-* and managed service kind ci-runner (#62)
2026-10-05 18:06:49 +00:00

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';