Skip to content

Commit

Permalink
Backfill challenges amount migration (#6262)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Oct 6, 2023
1 parent a9d1a97 commit 6149349
Showing 1 changed file with 81 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
begin;

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'profile-completion';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'listen-streak';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'track-upload';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'referrals';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'ref-v';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'referred';

UPDATE
user_challenges
SET amount = 5
WHERE amount = 0
AND challenge_id = 'connect-verified';

UPDATE
user_challenges
SET amount = 1
WHERE amount = 0
AND challenge_id = 'mobile-install';

UPDATE
user_challenges
SET amount = 100
WHERE amount = 0
AND challenge_id = 'tt';

UPDATE
user_challenges
SET amount = 100
WHERE amount = 0
AND challenge_id = 'tut';

UPDATE
user_challenges
SET amount = 100
WHERE amount = 0
AND challenge_id = 'tp';

UPDATE
user_challenges
SET amount = 2
WHERE amount = 0
AND challenge_id = 'send-first-tip';

UPDATE
user_challenges
SET amount = 2
WHERE amount = 0
AND challenge_id = 'first-playlist';

commit;

0 comments on commit 6149349

Please sign in to comment.