diff options
author | Christopher Baines <mail@cbaines.net> | 2020-04-04 12:20:48 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-04-04 12:20:48 +0100 |
commit | f61c1a11eddb8c14e90c1d3b5bd757712d45c25c (patch) | |
tree | f6596dcf128bd711ebb77b864cbdd7c03c51e621 /sqitch/sqlite | |
parent | 4a14e63ebd4f28e7b3be1ef11e4e1e1751d9a443 (diff) | |
download | build-coordinator-f61c1a11eddb8c14e90c1d3b5bd757712d45c25c.tar build-coordinator-f61c1a11eddb8c14e90c1d3b5bd757712d45c25c.tar.gz |
Add tables for derivations
Diffstat (limited to 'sqitch/sqlite')
-rw-r--r-- | sqitch/sqlite/deploy/initial_derivation_tables.sql | 23 | ||||
-rw-r--r-- | sqitch/sqlite/revert/initial_derivation_tables.sql | 7 | ||||
-rw-r--r-- | sqitch/sqlite/verify/initial_derivation_tables.sql | 7 |
3 files changed, 37 insertions, 0 deletions
diff --git a/sqitch/sqlite/deploy/initial_derivation_tables.sql b/sqitch/sqlite/deploy/initial_derivation_tables.sql new file mode 100644 index 0000000..1e63344 --- /dev/null +++ b/sqitch/sqlite/deploy/initial_derivation_tables.sql @@ -0,0 +1,23 @@ +-- Deploy guix-build-coordinator:initial_derivation_tables to sqlite + +BEGIN; + +CREATE TABLE derivations ( + name TEXT PRIMARY KEY, + system TEXT NOT NULL +); + +CREATE TABLE derivation_outputs ( + id INTEGER PRIMARY KEY ASC, + derivation_name TEXT NOT NULL REFERENCES derivations (name), + name TEXT NOT NULL, + output TEXT NOT NULL +); + +CREATE TABLE derivation_inputs ( + derivation_name TEXT REFERENCES derivations (name), + derivation_output_id INTEGER REFERENCES derivation_outputs (id), + PRIMARY KEY (derivation_name, derivation_output_id) +); + +COMMIT; diff --git a/sqitch/sqlite/revert/initial_derivation_tables.sql b/sqitch/sqlite/revert/initial_derivation_tables.sql new file mode 100644 index 0000000..e693ffe --- /dev/null +++ b/sqitch/sqlite/revert/initial_derivation_tables.sql @@ -0,0 +1,7 @@ +-- Revert guix-build-coordinator:initial_derivation_tables from sqlite + +BEGIN; + +-- XXX Add DDLs here. + +COMMIT; diff --git a/sqitch/sqlite/verify/initial_derivation_tables.sql b/sqitch/sqlite/verify/initial_derivation_tables.sql new file mode 100644 index 0000000..2838683 --- /dev/null +++ b/sqitch/sqlite/verify/initial_derivation_tables.sql @@ -0,0 +1,7 @@ +-- Verify guix-build-coordinator:initial_derivation_tables on sqlite + +BEGIN; + +-- XXX Add verifications here. + +ROLLBACK; |