aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-10-09 21:29:58 +0100
committerChristopher Baines <mail@cbaines.net>2023-10-09 22:19:02 +0100
commit10bad53ad57e92dbc3c6207c251f0af1148e8ffc (patch)
treecf42c97b823461457da74db873f2a968c3060e19 /sqitch
parent9bb8f84741bdd82b638e3a7a84280687d889fc04 (diff)
downloaddata-service-10bad53ad57e92dbc3c6207c251f0af1148e8ffc.tar
data-service-10bad53ad57e92dbc3c6207c251f0af1148e8ffc.tar.gz
Support polling git repositories for new branches/revisions
This is mostly a workaround for the occasional problems with the guix-commits mailing list, as it can break and then the data service doesn't learn about new revisions until the problem is fixed. I think it's still a generally good feature though, and allows deploying the data service without it consuming emails to learn about new revisions, and is a step towards integrating some kind of way of notifying the data service to poll.
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/git_repositories_poll_interval.sql8
-rw-r--r--sqitch/revert/git_repositories_poll_interval.sql7
-rw-r--r--sqitch/sqitch.plan1
-rw-r--r--sqitch/verify/git_repositories_poll_interval.sql7
4 files changed, 23 insertions, 0 deletions
diff --git a/sqitch/deploy/git_repositories_poll_interval.sql b/sqitch/deploy/git_repositories_poll_interval.sql
new file mode 100644
index 0000000..a75cac6
--- /dev/null
+++ b/sqitch/deploy/git_repositories_poll_interval.sql
@@ -0,0 +1,8 @@
+-- Deploy guix-data-service:git_repositories_poll_interval to pg
+
+BEGIN;
+
+ALTER TABLE git_repositories
+ ADD COLUMN poll_interval INTEGER DEFAULT NULL;
+
+COMMIT;
diff --git a/sqitch/revert/git_repositories_poll_interval.sql b/sqitch/revert/git_repositories_poll_interval.sql
new file mode 100644
index 0000000..fcb875d
--- /dev/null
+++ b/sqitch/revert/git_repositories_poll_interval.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:git_repositories_poll_interval from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index a3f8952..a4f14e8 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -96,3 +96,4 @@ blocked_builds_blocked_builds_blocked_derivation_output_details_set_id_2 2023-03
guix_revision_package_derivation_distribution_counts 2023-03-08T16:53:44Z Chris <chris@felis> # Add guix_revision_package_derivation_distribution_counts table
cascade_nar_foreign_keys 2023-08-01T09:42:33Z Chris <chris@felis> # Make it easier to delete nars entries
nar_indexes 2023-08-01T11:37:35Z Chris <chris@felis> # Add nar related indexes
+git_repositories_poll_interval 2023-10-08T20:36:09Z Chris <chris@felis> # Add git_repositories.poll_interval
diff --git a/sqitch/verify/git_repositories_poll_interval.sql b/sqitch/verify/git_repositories_poll_interval.sql
new file mode 100644
index 0000000..a2efd06
--- /dev/null
+++ b/sqitch/verify/git_repositories_poll_interval.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:git_repositories_poll_interval on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;