aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-06-22 01:13:36 +0200
committerChristopher Baines <mail@cbaines.net>2019-06-22 01:51:49 +0200
commitd96add30a02dc6f5cee313f37b31c5525dbd5a3d (patch)
tree61891cd35c108259bc6e04bc417f9142a38304c0 /sqitch
parentbaf2b17bf8bbe932ab112def1b2c067f633fb52b (diff)
downloaddata-service-d96add30a02dc6f5cee313f37b31c5525dbd5a3d.tar
data-service-d96add30a02dc6f5cee313f37b31c5525dbd5a3d.tar.gz
Record the output from loading new revisions to the database
So that it can easily be shown through the web interface. There's two tables being used. One which temporarily stores the output as it's output while the job is running, and other which stores the whole log once the job has finished.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/load_new_guix_revision_job_logs.sql16
-rw-r--r--sqitch/revert/load_new_guix_revision_job_logs.sql8
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/load_new_guix_revision_job_logs.sql7
4 files changed, 32 insertions, 0 deletions
diff --git a/sqitch/deploy/load_new_guix_revision_job_logs.sql b/sqitch/deploy/load_new_guix_revision_job_logs.sql
new file mode 100644
index 0000000..9eb804e
--- /dev/null
+++ b/sqitch/deploy/load_new_guix_revision_job_logs.sql
@@ -0,0 +1,16 @@
+-- Deploy guix-data-service:load_new_guix_revision_job_logs to pg
+
+BEGIN;
+
+CREATE TABLE load_new_guix_revision_job_log_parts (
+ id integer NOT NULL,
+ job_id integer NOT NULL,
+ contents text NOT NULL
+);
+
+CREATE TABLE load_new_guix_revision_job_logs (
+ job_id integer PRIMARY KEY REFERENCES load_new_guix_revision_jobs (id),
+ contents text NOT NULL
+);
+
+COMMIT;
diff --git a/sqitch/revert/load_new_guix_revision_job_logs.sql b/sqitch/revert/load_new_guix_revision_job_logs.sql
new file mode 100644
index 0000000..90c0413
--- /dev/null
+++ b/sqitch/revert/load_new_guix_revision_job_logs.sql
@@ -0,0 +1,8 @@
+-- Revert guix-data-service:load_new_guix_revision_job_logs from pg
+
+BEGIN;
+
+DROP TABLE load_new_guix_revision_job_log_parts;
+DROP TABLE load_new_guix_revision_job_logs;
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 56619b9..a03da58 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -13,3 +13,4 @@ add_git_repositories_cgit_url_base 2019-05-13T18:45:14Z Christopher Baines <mail
license_support 2019-05-13T20:37:40Z Christopher Baines <mail@cbaines.net> # Add support for storing license information
dates_to_load_new_guix_revision_jobs 2019-06-02T07:39:49Z Christopher Baines <mail@cbaines.net> # Add dates to the load_new_guix_revision_jobs table
load_new_guix_revision_job_events 2019-06-02T15:44:41Z Christopher Baines <mail@cbaines.net> # Add new table for guix_revision_job_events
+load_new_guix_revision_job_logs 2019-06-21T14:33:09Z chris <chris@phact> # Add load_new_guix_revision_job_logs
diff --git a/sqitch/verify/load_new_guix_revision_job_logs.sql b/sqitch/verify/load_new_guix_revision_job_logs.sql
new file mode 100644
index 0000000..aa33fbb
--- /dev/null
+++ b/sqitch/verify/load_new_guix_revision_job_logs.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:load_new_guix_revision_job_logs on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;