Skip to content

Commit

Permalink
fix failing build test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarunmeena0901 committed Mar 6, 2024
1 parent 472dc68 commit bba6428
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sql/migrations/2024-08-23-credit-section/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ BEGIN TRANSACTION;
-- Adding credit_section column in edition_data and edition_group_data table and intitalizing it with true
ALTER TABLE bookbrainz.edition_data ADD COLUMN credit_section BOOLEAN DEFAULT TRUE;
ALTER TABLE bookbrainz.edition_group_data ADD COLUMN credit_section BOOLEAN DEFAULT TRUE;
UPDATE edition_data SET credit_section = true;
UPDATE edition_group_data SET credit_section = true;
UPDATE bookbrainz.edition_data SET credit_section = true;
UPDATE bookbrainz.edition_group_data SET credit_section = true;

-- Recreate the view with the new definition
-- Adding credit_section column in edition view and edition_group view
Expand Down
4 changes: 2 additions & 2 deletions sql/schemas/bookbrainz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ CREATE TABLE bookbrainz.edition_data (
status_id INT,
credit_section BOOLEAN DEFAULT TRUE
);
UPDATE edition_data SET credit_section = true;
UPDATE bookbrainz.edition_data SET credit_section = true;
ALTER TABLE bookbrainz.edition_data ADD FOREIGN KEY (author_credit_id) REFERENCES bookbrainz.author_credit (id);
ALTER TABLE bookbrainz.edition_data ADD FOREIGN KEY (format_id) REFERENCES bookbrainz.edition_format (id);
ALTER TABLE bookbrainz.edition_data ADD FOREIGN KEY (edition_group_bbid) REFERENCES bookbrainz.edition_group_header (bbid);
Expand All @@ -381,7 +381,7 @@ CREATE TABLE bookbrainz.edition_group_data (
credit_section BOOLEAN DEFAULT TRUE
);

UPDATE edition_group_data SET credit_section = true;
UPDATE bookbrainz.edition_group_data SET credit_section = true;
ALTER TABLE bookbrainz.edition_group_data ADD FOREIGN KEY (type_id) REFERENCES bookbrainz.edition_group_type (id);
ALTER TABLE bookbrainz.edition_group_data ADD FOREIGN KEY (author_credit_id) REFERENCES bookbrainz.author_credit (id);
ALTER TABLE bookbrainz.edition_group_revision ADD FOREIGN KEY (data_id) REFERENCES bookbrainz.edition_group_data (id);
Expand Down

0 comments on commit bba6428

Please sign in to comment.