Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(user): implement user ratings deletion todo #2316

Conversation

wescopeland
Copy link
Member

Very minor housekeeping task as I work through the tables with user relations.

We can't write to these records anymore, but we do delete them on account deletion. This PR implements a TODO by associating Rating to the User model.

We should also populate the user_id records in stage & prod. They are currently unpopulated. I tested the following query on preview.

UPDATE Rating r
JOIN UserAccounts ua on r.User = ua.User
SET r.user_id = ua.ID;

@wescopeland wescopeland requested a review from a team March 30, 2024 01:25
Copy link
Member

@Jamiras Jamiras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine. Untested.

If we're not planning to re-enable the feature, shouldn't we just purge all the records and the related code?

@wescopeland
Copy link
Member Author

wescopeland commented Mar 31, 2024

shouldn't we just purge all the records and the related code?

It's probably the right thing to do. I'll clone the table data from prod and store it somewhere secure, just in case.

I'll close this PR in favor of a separate PR to drop the table, model, and related code.

@wescopeland wescopeland deleted the clear-ratings-on-account-delete branch March 31, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants