Add a new channel-news module, along with tables the relevant data
This commit is contained in:
parent
66d726f1fd
commit
3ef99acc79
6 changed files with 193 additions and 0 deletions
39
sqitch/deploy/channel_news_tables.sql
Normal file
39
sqitch/deploy/channel_news_tables.sql
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
-- Deploy guix-data-service:channel_news_tables to pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
CREATE TABLE channel_news_entries (
|
||||
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
commit varchar,
|
||||
tag varchar
|
||||
);
|
||||
|
||||
CREATE TABLE guix_revision_channel_news_entries (
|
||||
guix_revision_id integer NOT NULL REFERENCES guix_revisions (id),
|
||||
channel_news_entry_id integer NOT NULL REFERENCES channel_news_entries (id),
|
||||
index integer NOT NULL,
|
||||
PRIMARY KEY (guix_revision_id, channel_news_entry_id)
|
||||
);
|
||||
|
||||
CREATE TABLE channel_news_entry_text (
|
||||
id integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY,
|
||||
lang varchar NOT NULL,
|
||||
text varchar NOT NULL,
|
||||
UNIQUE (lang, text)
|
||||
);
|
||||
|
||||
CREATE TABLE channel_news_entry_titles (
|
||||
channel_news_entry_id
|
||||
integer NOT NULL REFERENCES channel_news_entries (id),
|
||||
channel_news_entry_text_id
|
||||
integer NOT NULL REFERENCES channel_news_entry_text (id)
|
||||
);
|
||||
|
||||
CREATE TABLE channel_news_entry_bodies (
|
||||
channel_news_entry_id
|
||||
integer NOT NULL REFERENCES channel_news_entries (id),
|
||||
channel_news_entry_text_id
|
||||
integer NOT NULL REFERENCES channel_news_entry_text (id)
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
11
sqitch/revert/channel_news_tables.sql
Normal file
11
sqitch/revert/channel_news_tables.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
-- Revert guix-data-service:channel_news_tables from pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
DROP TABLE guix_revision_channel_news_entries;
|
||||
DROP TABLE channel_news_entry_titles;
|
||||
DROP TABLE channel_news_entry_bodies;
|
||||
DROP TABLE channel_news_entry_text;
|
||||
DROP TABLE channel_news_entries;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -26,3 +26,4 @@ fix_null_values_in_git_branches 2019-09-29T11:06:12Z Christopher Baines <mail@cb
|
|||
add_retry_value_to_job_event_enum 2019-10-02T19:13:52Z Christopher Baines <mail@cbaines.net> # Add retry value to job_event enum
|
||||
remove_guix_revision_duplicates 2019-10-05T08:00:14Z Christopher Baines <mail@cbaines.net> # Remove duplicates in the guix_revisions table
|
||||
package_derivations_by_guix_revision_range 2019-11-09T19:09:48Z Christopher Baines <mail@cbaines.net> # Add package_derivations_by_guix_revision_range
|
||||
channel_news_tables 2019-11-15T07:32:07Z Christopher Baines <mail@cbaines.net> # Add tables to store channel news
|
||||
|
|
|
|||
7
sqitch/verify/channel_news_tables.sql
Normal file
7
sqitch/verify/channel_news_tables.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
-- Verify guix-data-service:channel_news_tables on pg
|
||||
|
||||
BEGIN;
|
||||
|
||||
-- XXX Add verifications here.
|
||||
|
||||
ROLLBACK;
|
||||
Loading…
Add table
Add a link
Reference in a new issue