Skip to content

Commit

Permalink
Improved history check.
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixRilling committed Jun 25, 2023
1 parent 7d61f5d commit 0686d77
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ WHERE r.id IN
CREATE VIEW musicbrainz_enricher.release_work_queue AS
SELECT *
FROM musicbrainz_enricher.release_with_relationships r
WHERE r.gid NOT IN (SELECT rhe.release_gid FROM musicbrainz_enricher.release_history_entry rhe);
LEFT JOIN musicbrainz_enricher.release_history_entry rhe ON r.gid = rhe.release_gid
WHERE rhe.release_gid IS NULL;


CREATE TABLE musicbrainz_enricher.release_group_history_entry
Expand All @@ -22,7 +23,7 @@ CREATE TABLE musicbrainz_enricher.release_group_history_entry
ON DELETE CASCADE
);

CREATE MATERIALIZED VIEW musicbrainz_enricher.release_group_with_relationships AS
CREATE VIEW musicbrainz_enricher.release_group_with_relationships AS
SELECT *
FROM musicbrainz.release_group rg
WHERE rg.id IN
Expand All @@ -31,4 +32,5 @@ WHERE rg.id IN
CREATE VIEW musicbrainz_enricher.release_group_work_queue AS
SELECT *
FROM musicbrainz_enricher.release_group_with_relationships rg
WHERE rg.gid NOT IN (SELECT rghe.release_group_gid FROM musicbrainz_enricher.release_group_history_entry rghe);
LEFT JOIN musicbrainz_enricher.release_group_history_entry rghe ON rg.gid = rghe.release_group_gid
WHERE rghe.release_group_gid IS NULL;

0 comments on commit 0686d77

Please sign in to comment.