diff options
author | Christopher Baines <mail@cbaines.net> | 2019-05-05 20:06:28 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2019-05-05 20:06:28 +0100 |
commit | 5028dfe706856d11246a7338dfd47d4035d8fb25 (patch) | |
tree | 9e13cf7e390e345a42f0c3bfd4d30537e12bc52f /sqitch | |
parent | ce4c3c6ed3979e54a8d5db6514bf4ed87de8b707 (diff) | |
download | data-service-5028dfe706856d11246a7338dfd47d4035d8fb25.tar data-service-5028dfe706856d11246a7338dfd47d4035d8fb25.tar.gz |
Start to handle information about Git branches
Add some new pages /branches and /branch/... as well as a new git_branches
table. Also extend the email processing to enter the branch information in to
the database.
Diffstat (limited to 'sqitch')
-rw-r--r-- | sqitch/deploy/git_branches.sql | 13 | ||||
-rw-r--r-- | sqitch/revert/git_branches.sql | 7 | ||||
-rw-r--r-- | sqitch/sqitch.plan | 1 | ||||
-rw-r--r-- | sqitch/verify/git_branches.sql | 8 |
4 files changed, 29 insertions, 0 deletions
diff --git a/sqitch/deploy/git_branches.sql b/sqitch/deploy/git_branches.sql new file mode 100644 index 0000000..4b926b5 --- /dev/null +++ b/sqitch/deploy/git_branches.sql @@ -0,0 +1,13 @@ +-- Deploy guix-data-service:git_branches to pg + +BEGIN; + +CREATE TABLE git_branches ( + name character varying NOT NULL, + commit character varying, + git_repository_id integer NOT NULL, + datetime timestamp without time zone NOT NULL, + CONSTRAINT name_commit PRIMARY KEY(name, commit) +); + +COMMIT; diff --git a/sqitch/revert/git_branches.sql b/sqitch/revert/git_branches.sql new file mode 100644 index 0000000..f04a167 --- /dev/null +++ b/sqitch/revert/git_branches.sql @@ -0,0 +1,7 @@ +-- Revert guix-data-service:git_branches from pg + +BEGIN; + +DROP TABLE git_branches; + +COMMIT; diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan index 97c152b..9e1c540 100644 --- a/sqitch/sqitch.plan +++ b/sqitch/sqitch.plan @@ -6,3 +6,4 @@ appschema 2019-04-13T11:43:59Z Christopher Baines <mail@cbaines.net> # Add schem buildstatus_enum [appschema] 2019-04-13T11:56:37Z Christopher Baines <mail@cbaines.net> # Creates the buildstatus enum initial_import 2019-04-13T13:06:28Z Christopher Baines <mail@cbaines.net> # Import the manually managed database schema git_repositories 2019-05-04T19:03:38Z Christopher Baines <mail@cbaines.net> # Add a git_repositories table +git_branches 2019-05-05T14:53:12Z Christopher Baines <mail@cbaines.net> # Add a git_branches table diff --git a/sqitch/verify/git_branches.sql b/sqitch/verify/git_branches.sql new file mode 100644 index 0000000..2fec6f0 --- /dev/null +++ b/sqitch/verify/git_branches.sql @@ -0,0 +1,8 @@ +-- Verify guix-data-service:git_branches on pg + +BEGIN; + +SELECT name, commit, git_repository_id, datetime + FROM git_branches WHERE FALSE; + +ROLLBACK; |