aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-06 19:54:41 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-10 20:34:47 +0100
commitf0524be43ea57996c2c5ddf1b859a30fb887bfe2 (patch)
treed34c16445c81e5cffb3a85075e23528118900694 /sqitch
parent75290ee2db7452168c966fd9585c4e12f0c2e849 (diff)
downloadbuild-coordinator-f0524be43ea57996c2c5ddf1b859a30fb887bfe2.tar
build-coordinator-f0524be43ea57996c2c5ddf1b859a30fb887bfe2.tar.gz
Add a migration to create the builds table
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/pg/deploy/create_builds.sql7
-rw-r--r--sqitch/pg/revert/create_builds.sql7
-rw-r--r--sqitch/pg/verify/create_builds.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/sqlite/deploy/create_builds.sql12
-rw-r--r--sqitch/sqlite/revert/create_builds.sql7
-rw-r--r--sqitch/sqlite/verify/create_builds.sql7
7 files changed, 48 insertions, 0 deletions
diff --git a/sqitch/pg/deploy/create_builds.sql b/sqitch/pg/deploy/create_builds.sql
new file mode 100644
index 0000000..993dd66
--- /dev/null
+++ b/sqitch/pg/deploy/create_builds.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-build-coordinator:create_builds to pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/revert/create_builds.sql b/sqitch/pg/revert/create_builds.sql
new file mode 100644
index 0000000..f97de87
--- /dev/null
+++ b/sqitch/pg/revert/create_builds.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:create_builds from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/pg/verify/create_builds.sql b/sqitch/pg/verify/create_builds.sql
new file mode 100644
index 0000000..0a56dab
--- /dev/null
+++ b/sqitch/pg/verify/create_builds.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:create_builds on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 3e4dc78..812a090 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -3,3 +3,4 @@
schema 2020-04-03T21:01:15Z Christopher Baines <mail@cbaines.net> # Create a schema
initial_derivation_tables 2020-04-04T09:48:34Z Christopher Baines <mail@cbaines.net> # Create initial derivation related tables
+create_builds 2020-04-06T18:50:48Z Christopher Baines <mail@cbaines.net> # Create builds
diff --git a/sqitch/sqlite/deploy/create_builds.sql b/sqitch/sqlite/deploy/create_builds.sql
new file mode 100644
index 0000000..18e9dc3
--- /dev/null
+++ b/sqitch/sqlite/deploy/create_builds.sql
@@ -0,0 +1,12 @@
+-- Deploy guix-build-coordinator:create_builds to sqlite
+
+BEGIN;
+
+CREATE TABLE builds (
+ uuid TEXT PRIMARY KEY,
+ derivation_name TEXT NOT NULL REFERENCES derivations (name),
+ priority INTEGER NOT NULL,
+ processed BOOLEAN NOT NULL DEFAULT 0
+);
+
+COMMIT;
diff --git a/sqitch/sqlite/revert/create_builds.sql b/sqitch/sqlite/revert/create_builds.sql
new file mode 100644
index 0000000..5d995fe
--- /dev/null
+++ b/sqitch/sqlite/revert/create_builds.sql
@@ -0,0 +1,7 @@
+-- Revert guix-build-coordinator:create_builds from sqlite
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqlite/verify/create_builds.sql b/sqitch/sqlite/verify/create_builds.sql
new file mode 100644
index 0000000..06c4039
--- /dev/null
+++ b/sqitch/sqlite/verify/create_builds.sql
@@ -0,0 +1,7 @@
+-- Verify guix-build-coordinator:create_builds on sqlite
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;