Docker images / prepare-release (push) Successful in 11s
Docker images / backend-test (push) Failing after 4m0s
Docker images / backend-image (push) Skipped
Docker images / frontend-image (push) Successful in 5m0s
Docker images / updater-image (push) Successful in 1m56s
Docker images / netflow-agent-image (push) Successful in 33s
Docker images / publish-release (push) Skipped
Docker images / notify-webhook (push) Skipped
35 lines
1.3 KiB
PL/PgSQL
35 lines
1.3 KiB
PL/PgSQL
BEGIN;
|
|
|
|
ALTER TABLE public.servers DROP CONSTRAINT servers_type_check;
|
|
ALTER TABLE public.servers ADD CONSTRAINT servers_type_check
|
|
CHECK (type IN ('jump-host', 'exit-node', 'home-router', 'ix-node'));
|
|
|
|
CREATE TABLE public.ix_segments (
|
|
id uuid PRIMARY KEY,
|
|
name text NOT NULL UNIQUE,
|
|
revision integer NOT NULL CHECK (revision > 0),
|
|
configuration jsonb NOT NULL CHECK (jsonb_typeof(configuration) = 'object'),
|
|
applied_revision integer CHECK (applied_revision > 0 AND applied_revision <= revision),
|
|
updated_at timestamptz NOT NULL DEFAULT now()
|
|
);
|
|
|
|
CREATE TABLE public.ix_segment_devices (
|
|
segment_id uuid NOT NULL REFERENCES public.ix_segments(id) ON DELETE CASCADE,
|
|
server_id bigint NOT NULL REFERENCES public.servers(id) ON DELETE RESTRICT,
|
|
PRIMARY KEY (segment_id, server_id)
|
|
);
|
|
CREATE INDEX ix_segment_devices_server_idx ON public.ix_segment_devices(server_id);
|
|
|
|
CREATE TABLE public.ix_segment_revisions (
|
|
segment_id uuid NOT NULL REFERENCES public.ix_segments(id) ON DELETE CASCADE,
|
|
revision integer NOT NULL CHECK (revision > 0),
|
|
configuration jsonb NOT NULL CHECK (jsonb_typeof(configuration) = 'object'),
|
|
actor_id text NOT NULL,
|
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
PRIMARY KEY (segment_id, revision)
|
|
);
|
|
|
|
INSERT INTO public.schema_migrations (id) VALUES ('0058_internet_exchange') ON CONFLICT (id) DO NOTHING;
|
|
|
|
COMMIT;
|