mirror of
git://git.savannah.gnu.org/guix/data-service.git
synced 2023-12-14 03:23:03 +01:00
21 lines
646 B
PL/PgSQL
21 lines
646 B
PL/PgSQL
-- Deploy guix-data-service:system_test_tables to pg
|
|
|
|
BEGIN;
|
|
|
|
CREATE TABLE system_tests (
|
|
id integer NOT NULL GENERATED ALWAYS AS IDENTITY,
|
|
name varchar NOT NULL,
|
|
description varchar NOT NULL,
|
|
location_id integer NOT NULL REFERENCES locations (id),
|
|
PRIMARY KEY (name, description, location_id),
|
|
UNIQUE (id)
|
|
);
|
|
|
|
CREATE TABLE guix_revision_system_test_derivations (
|
|
guix_revision_id integer NOT NULL REFERENCES guix_revisions (id),
|
|
system_test_id integer NOT NULL REFERENCES system_tests (id),
|
|
derivation_id integer NOT NULL REFERENCES derivations (id),
|
|
PRIMARY KEY (guix_revision_id, system_test_id, derivation_id)
|
|
);
|
|
|
|
COMMIT;
|