Skip to content

Commit

Permalink
fix(sql): Add annotation_id column to all import views
Browse files Browse the repository at this point in the history
You may have to drop existing views manually because of a PG limitation.
  • Loading branch information
kellnerd committed Jul 22, 2024
1 parent e1f0c11 commit 8bbf264
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/migrations/import/up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ CREATE OR REPLACE VIEW bookbrainz.edition_import AS
SELECT
import.id AS import_id,
edition_data.id as data_id,
edition_data.annotation_id,
edition_data.disambiguation_id,
alias_set.default_alias_id,
edition_data.width,
Expand All @@ -146,6 +147,7 @@ CREATE OR REPLACE VIEW bookbrainz.publisher_import AS
SELECT
import.id AS import_id,
publisher_data.id as data_id,
publisher_data.annotation_id,
publisher_data.disambiguation_id,
alias_set.default_alias_id,
publisher_data.begin_year,
Expand All @@ -171,6 +173,7 @@ CREATE OR REPLACE VIEW bookbrainz.edition_group_import AS
SELECT
import.id AS import_id,
edition_group_data.id as data_id,
edition_group_data.annotation_id,
edition_group_data.disambiguation_id,
alias_set.default_alias_id,
edition_group_data.type_id,
Expand Down
3 changes: 3 additions & 0 deletions sql/schemas/bookbrainz.sql
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ CREATE VIEW bookbrainz.edition_import AS
SELECT
import.id AS import_id,
edition_data.id as data_id,
edition_data.annotation_id,
edition_data.disambiguation_id,
alias_set.default_alias_id,
edition_data.width,
Expand All @@ -1007,6 +1008,7 @@ CREATE VIEW bookbrainz.publisher_import AS
SELECT
import.id AS import_id,
publisher_data.id as data_id,
publisher_data.annotation_id,
publisher_data.disambiguation_id,
alias_set.default_alias_id,
publisher_data.begin_year,
Expand All @@ -1032,6 +1034,7 @@ CREATE VIEW bookbrainz.edition_group_import AS
SELECT
import.id AS import_id,
edition_group_data.id as data_id,
edition_group_data.annotation_id,
edition_group_data.disambiguation_id,
alias_set.default_alias_id,
edition_group_data.type_id,
Expand Down

0 comments on commit 8bbf264

Please sign in to comment.