VRFS-117 - added recording genre support

This commit is contained in:
Brian Smith 2012-12-02 00:38:35 -05:00
parent c9c7db941a
commit 183089b104
2 changed files with 9 additions and 1 deletions

View File

@ -26,4 +26,5 @@ add_recording_creator_id.sql
make_location_nullable.sql
band_invitations.sql
image_urls.sql
max_mind.sql
max_mind.sql
recordings_genres.sql

7
up/recordings_genres.sql Normal file
View File

@ -0,0 +1,7 @@
-- recording -> genre mapping
CREATE TABLE recordings_genres (
recording_id VARCHAR(64) NOT NULL REFERENCES recordings(id) ON DELETE CASCADE,
genre_id VARCHAR(64) NOT NULL REFERENCES genres(id) ON DELETE CASCADE
);
ALTER TABLE recordings_genres ADD CONSTRAINT recording_genre_uniqkey UNIQUE (recording_id, genre_id);