Skip to content

Commit

Permalink
fix: updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
sattvikc committed Sep 13, 2023
1 parent 6d2b9fd commit 29f6560
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Added a two new columns in `all_auth_recipe_users`:
- `primary_or_recipe_user_id` (default value is equal to `user_id` column)
- `is_linked_or_is_a_primary_user` (default value is false)
- Added a two new columns in `app_id_to_user_id`:
- `primary_or_recipe_user_id` (default value is equal to `user_id` column)
- `is_linked_or_is_a_primary_user` (default value is false)
- Dropped existing fkey constraint on `emailpassword_pswd_reset_tokens`, and added a new fkey constraint on `app_id_to_user_id` table.
- Added new column in `emailpassword_pswd_reset_tokens` to store email

Expand Down Expand Up @@ -59,6 +62,24 @@ ALTER TABLE all_auth_recipe_users
ALTER TABLE all_auth_recipe_users
ALTER primary_or_recipe_user_id DROP DEFAULT;

ALTER TABLE app_id_to_user_id
ADD COLUMN primary_or_recipe_user_id CHAR(36) NOT NULL DEFAULT ('0');

ALTER TABLE app_id_to_user_id
ADD COLUMN is_linked_or_is_a_primary_user BOOLEAN NOT NULL DEFAULT FALSE;

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

ALTER TABLE app_id_to_user_id
ADD CONSTRAINT app_id_to_user_id_primary_or_recipe_user_id_fkey
FOREIGN KEY (app_id, primary_or_recipe_user_id)
REFERENCES app_id_to_user_id (app_id, user_id) ON DELETE CASCADE;

ALTER TABLE app_id_to_user_id
ALTER primary_or_recipe_user_id DROP DEFAULT;

DROP INDEX all_auth_recipe_users_pagination_index;
CREATE INDEX all_auth_recipe_users_pagination_index1 ON all_auth_recipe_users (
app_id, tenant_id, primary_or_recipe_user_time_joined DESC, primary_or_recipe_user_id DESC);
Expand Down

0 comments on commit 29f6560

Please sign in to comment.