ERP items INF-CI-CLD-STD/BUS/ENT (Monat, 149/290/590 EUR) and INF-CI-OPR-STD/BUS/ENT (Jahr, 2900/5900/11900 EUR), priced per runner: a dedicated build machine per customer, never shared (2 vCPU/4 GB, 4 vCPU/8 GB, 8 vCPU/16 GB). Migration 0013 adds the managed service kind ci-runner (SKU ^INF-CI-(CLD|OPR)-(STD|BUS|ENT)$). A runner's url is the Git instance it serves, so the (tenant, kind, url) uniqueness now holds for kind git only (partial unique index); several runners may serve one instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
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';
|