From 8bbf264731f5e55b390914e39482da1eb30c8412 Mon Sep 17 00:00:00 2001 From: David Kellner <52860029+kellnerd@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:21:27 +0200 Subject: [PATCH] fix(sql): Add `annotation_id` column to all import views You may have to drop existing views manually because of a PG limitation. --- sql/migrations/import/up.sql | 3 +++ sql/schemas/bookbrainz.sql | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sql/migrations/import/up.sql b/sql/migrations/import/up.sql index 34b2225fe..37ae95c10 100644 --- a/sql/migrations/import/up.sql +++ b/sql/migrations/import/up.sql @@ -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, @@ -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, @@ -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, diff --git a/sql/schemas/bookbrainz.sql b/sql/schemas/bookbrainz.sql index d3bdc9899..82947af21 100644 --- a/sql/schemas/bookbrainz.sql +++ b/sql/schemas/bookbrainz.sql @@ -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, @@ -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, @@ -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,