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
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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue