Skip to content

Commit

Permalink
fix: updated migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Sep 7, 2023
1 parent bd99d66 commit 82a2216
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ ALTER TABLE all_auth_recipe_users
ALTER TABLE all_auth_recipe_users
ADD COLUMN is_linked_or_is_a_primary_user BOOLEAN NOT NULL DEFAULT FALSE;

ALTER TABLE all_auth_recipe_users
ADD COLUMN primary_or_recipe_user_time_joined BIGINT NOT NULL DEFAULT 0;

UPDATE all_auth_recipe_users
SET primary_or_recipe_user_id = user_id
WHERE primary_or_recipe_user_id = '0';

UPDATE all_auth_recipe_users
SET primary_or_recipe_user_time_joined = time_joined
WHERE primary_or_recipe_user_time_joined = 0;


ALTER TABLE all_auth_recipe_users
ALTER primary_or_recipe_user_id DROP DEFAULT;

Expand Down

0 comments on commit 82a2216

Please sign in to comment.