Skip to content

Commit

Permalink
Remove constraint of unique Download for a user and a sound
Browse files Browse the repository at this point in the history
issue #840
  • Loading branch information
Andres Ferraro committed Jul 12, 2017
1 parent 163a6a8 commit f254e77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _sql/nightingale_sql_setup.sql
Expand Up @@ -99,13 +99,13 @@ where d.pack_id = sounds_pack.id;
update accounts_profile set has_old_license = (num_sounds > 0) ;

-- unqueness for downloads with null of either field
CREATE UNIQUE INDEX sounds_download_user_pack_unique
CREATE INDEX sounds_download_user_pack
ON sounds_download
USING btree
(user_id, sound_id)
WHERE pack_id IS NULL;

CREATE UNIQUE INDEX sounds_download_user_sound_unique
CREATE INDEX sounds_download_user_sound
ON sounds_download
USING btree
(user_id, pack_id)
Expand Down

0 comments on commit f254e77

Please sign in to comment.