diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-03 22:57:57 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-03 22:57:57 +0000 |
commit | a3d84b1aec667770d27016950f0c310b170f5ba3 (patch) | |
tree | 5a0d431dac26b73432a4b402779ae787ab275313 /sqitch | |
parent | 19630014a3db7a2cb8e8efa97c5cc45847414557 (diff) | |
download | data-service-a3d84b1aec667770d27016950f0c310b170f5ba3.tar data-service-a3d84b1aec667770d27016950f0c310b170f5ba3.tar.gz |
Add missing migration
Diffstat (limited to 'sqitch')
-rw-r--r-- | sqitch/deploy/system_test_tables.sql | 21 | ||||
-rw-r--r-- | sqitch/revert/system_test_tables.sql | 8 | ||||
-rw-r--r-- | sqitch/verify/system_test_tables.sql | 7 |
3 files changed, 36 insertions, 0 deletions
diff --git a/sqitch/deploy/system_test_tables.sql b/sqitch/deploy/system_test_tables.sql new file mode 100644 index 0000000..5c7b659 --- /dev/null +++ b/sqitch/deploy/system_test_tables.sql @@ -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; diff --git a/sqitch/revert/system_test_tables.sql b/sqitch/revert/system_test_tables.sql new file mode 100644 index 0000000..c55726f --- /dev/null +++ b/sqitch/revert/system_test_tables.sql @@ -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; diff --git a/sqitch/verify/system_test_tables.sql b/sqitch/verify/system_test_tables.sql new file mode 100644 index 0000000..cc108ed --- /dev/null +++ b/sqitch/verify/system_test_tables.sql @@ -0,0 +1,7 @@ +-- Verify guix-data-service:system_test_tables on pg + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |