aboutsummaryrefslogtreecommitdiff
path: root/sqitch/sqlite/deploy/initial_derivation_tables.sql
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch/sqlite/deploy/initial_derivation_tables.sql')
-rw-r--r--sqitch/sqlite/deploy/initial_derivation_tables.sql23
1 files changed, 23 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;