Store and display the location of packages
Store the location a package can be found at, and display this on the package page. If available, link off to the git repository containing the package.
This commit is contained in:
parent
9aaab6b751
commit
7341d17254
15 changed files with 217 additions and 28 deletions
7
sqitch/deploy/add_git_repositories_cgit_url_base.sql
Normal file
7
sqitch/deploy/add_git_repositories_cgit_url_base.sql
Normal file
|
|
@ -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;
|
||||
20
sqitch/deploy/add_location_information.sql
Normal file
20
sqitch/deploy/add_location_information.sql
Normal file
|
|
@ -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;
|
||||
7
sqitch/revert/add_git_repositories_cgit_url_base.sql
Normal file
7
sqitch/revert/add_git_repositories_cgit_url_base.sql
Normal file
|
|
@ -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;
|
||||
7
sqitch/revert/add_location_information.sql
Normal file
7
sqitch/revert/add_location_information.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Revert guix-data-service:add_location_information from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add DDLs here.
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -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
|
||||
|
|
|
|||
7
sqitch/verify/add_git_repositories_cgit_url_base.sql
Normal file
7
sqitch/verify/add_git_repositories_cgit_url_base.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:add_git_repositories_cgit_url_base on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
||||
7
sqitch/verify/add_location_information.sql
Normal file
7
sqitch/verify/add_location_information.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:add_location_information on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
||||
Loading…
Add table
Add a link
Reference in a new issue