aboutsummaryrefslogtreecommitdiff
path: root/sqitch
diff options
context:
space:
mode:
Diffstat (limited to 'sqitch')
-rw-r--r--sqitch/deploy/add_git_repositories_cgit_url_base.sql7
-rw-r--r--sqitch/deploy/add_location_information.sql20
-rw-r--r--sqitch/revert/add_git_repositories_cgit_url_base.sql7
-rw-r--r--sqitch/revert/add_location_information.sql7
-rw-r--r--sqitch/sqitch.plan2
-rw-r--r--sqitch/verify/add_git_repositories_cgit_url_base.sql7
-rw-r--r--sqitch/verify/add_location_information.sql7
7 files changed, 57 insertions, 0 deletions
diff --git a/sqitch/deploy/add_git_repositories_cgit_url_base.sql b/sqitch/deploy/add_git_repositories_cgit_url_base.sql
new file mode 100644
index 0000000..7a2d532
--- /dev/null
+++ b/sqitch/deploy/add_git_repositories_cgit_url_base.sql
@@ -0,0 +1,7 @@
+-- Deploy guix-data-service:add_git_repositories_cgit_url_base to pg
+
+BEGIN;
+
+ALTER TABLE git_repositories ADD COLUMN cgit_url_base character varying;
+
+COMMIT;
diff --git a/sqitch/deploy/add_location_information.sql b/sqitch/deploy/add_location_information.sql
new file mode 100644
index 0000000..7855feb
--- /dev/null
+++ b/sqitch/deploy/add_location_information.sql
@@ -0,0 +1,20 @@
+-- Deploy guix-data-service:add_location_information to pg
+
+BEGIN;
+
+CREATE TABLE locations (
+ id integer GENERATED BY DEFAULT AS IDENTITY,
+ file character varying NOT NULL,
+ line integer NOT NULL,
+ column_number integer NOT NULL,
+ CONSTRAINT file_line_column PRIMARY KEY(file, line, column_number),
+ UNIQUE (id)
+);
+
+ALTER TABLE package_metadata ADD COLUMN location_id integer REFERENCES locations(id);
+
+ALTER TABLE package_metadata DROP CONSTRAINT synopsis_description_home_page;
+
+ALTER TABLE package_metadata ADD CONSTRAINT synopsis_description_home_page_location_id UNIQUE (synopsis, description, home_page, location_id);
+
+COMMIT;
diff --git a/sqitch/revert/add_git_repositories_cgit_url_base.sql b/sqitch/revert/add_git_repositories_cgit_url_base.sql
new file mode 100644
index 0000000..67c5a87
--- /dev/null
+++ b/sqitch/revert/add_git_repositories_cgit_url_base.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:add_git_repositories_cgit_url_base from pg
+
+BEGIN;
+
+ALTER TABLE git_repositories DROP COLUMN cgit_url_base;
+
+COMMIT;
diff --git a/sqitch/revert/add_location_information.sql b/sqitch/revert/add_location_information.sql
new file mode 100644
index 0000000..31220ed
--- /dev/null
+++ b/sqitch/revert/add_location_information.sql
@@ -0,0 +1,7 @@
+-- Revert guix-data-service:add_location_information from pg
+
+BEGIN;
+
+-- XXX Add DDLs here.
+
+COMMIT;
diff --git a/sqitch/sqitch.plan b/sqitch/sqitch.plan
index 026aa7f..1898562 100644
--- a/sqitch/sqitch.plan
+++ b/sqitch/sqitch.plan
@@ -8,3 +8,5 @@ initial_import 2019-04-13T13:06:28Z Christopher Baines <mail@cbaines.net> # Impo
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
remove_package_metadata_sha1_hash 2019-05-12T10:37:40Z Christopher Baines <mail@cbaines.net> # Remove the sha1_hash field from package_metadata
+add_location_information 2019-05-12T20:27:48Z Christopher Baines <mail@cbaines.net> # Add locations table and location to package_metadata
+add_git_repositories_cgit_url_base 2019-05-13T18:45:14Z Christopher Baines <mail@cbaines.net> # Add cgit_url_base to git_repositories
diff --git a/sqitch/verify/add_git_repositories_cgit_url_base.sql b/sqitch/verify/add_git_repositories_cgit_url_base.sql
new file mode 100644
index 0000000..9fa2dee
--- /dev/null
+++ b/sqitch/verify/add_git_repositories_cgit_url_base.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:add_git_repositories_cgit_url_base on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;
diff --git a/sqitch/verify/add_location_information.sql b/sqitch/verify/add_location_information.sql
new file mode 100644
index 0000000..821c643
--- /dev/null
+++ b/sqitch/verify/add_location_information.sql
@@ -0,0 +1,7 @@
+-- Verify guix-data-service:add_location_information on pg
+
+BEGIN;
+
+-- XXX Add verifications here.
+
+ROLLBACK;