diff --git a/rose/cache.sql b/rose/cache.sql index 8ac8347..c6694ef 100644 --- a/rose/cache.sql +++ b/rose/cache.sql @@ -97,7 +97,7 @@ CREATE TABLE releases_artists ( artist_sanitized TEXT NOT NULL, role TEXT REFERENCES artist_role_enum(value) NOT NULL, alias BOOL NOT NULL, - PRIMARY KEY (release_id, artist, role) + PRIMARY KEY (release_id, artist, role, alias) ); CREATE INDEX releases_artists_release_id ON releases_artists(release_id); CREATE INDEX releases_artists_artist ON releases_artists(artist); @@ -109,7 +109,7 @@ CREATE TABLE tracks_artists ( artist_sanitized TEXT NOT NULL, role TEXT REFERENCES artist_role_enum(value) NOT NULL, alias BOOL NOT NULL, - PRIMARY KEY (track_id, artist, role) + PRIMARY KEY (track_id, artist, role, alias) ); CREATE INDEX tracks_artists_track_id ON tracks_artists(track_id); CREATE INDEX tracks_artists_artist ON tracks_artists(artist);