Add missing migration
This commit is contained in:
parent
19630014a3
commit
a3d84b1aec
3 changed files with 36 additions and 0 deletions
21
sqitch/deploy/system_test_tables.sql
Normal file
21
sqitch/deploy/system_test_tables.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
-- 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;
|
||||||
8
sqitch/revert/system_test_tables.sql
Normal file
8
sqitch/revert/system_test_tables.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- Revert guix-data-service:system_test_tables from pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
DROP TABLE guix_revision_system_test_derivations;
|
||||||
|
DROP TABLE system_tests;
|
||||||
|
|
||||||
|
COMMIT;
|
||||||
7
sqitch/verify/system_test_tables.sql
Normal file
7
sqitch/verify/system_test_tables.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- Verify guix-data-service:system_test_tables on pg
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
-- XXX Add verifications here.
|
||||||
|
|
||||||
|
ROLLBACK;
|
||||||
Loading…
Add table
Add a link
Reference in a new issue