aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-04 12:20:48 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-04 12:20:48 +0100
commitf61c1a11eddb8c14e90c1d3b5bd757712d45c25c (patch)
treef6596dcf128bd711ebb77b864cbdd7c03c51e621 /sqitch/sqlite
parent4a14e63ebd4f28e7b3be1ef11e4e1e1751d9a443 (diff)
downloadbuild-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.sql23
-rw-r--r--sqitch/sqlite/revert/initial_derivation_tables.sql7
-rw-r--r--sqitch/sqlite/verify/initial_derivation_tables.sql7
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;