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

Fix memberships with role member #5238

Merged
merged 1 commit into from
May 23, 2024
Merged

Fix memberships with role member #5238

merged 1 commit into from
May 23, 2024

Conversation

PopDaph
Copy link
Contributor

@PopDaph PopDaph commented May 23, 2024

Description

Running SELECT role, COUNT(id) FROM memberships GROUP BY role; on Metabase yesterday made me realize that we have some rows on Memberships that have the role "member" instead of "user".

This was introduced here: https://github.com/dust-tt/dust/blob/main/front/migrations/20240403_memberships_no_more_revoked.ts

=> As a fix, this PR is adding a new migration file to set those memberships back to role user as it should be.

Risk

Deploy Plan

Deploy to Prodbox.
Run psql $FRONT_DATABASE_URI -f ./migrations/db/migration_10.sql.

@PopDaph PopDaph requested a review from spolu May 23, 2024 12:34
Copy link
Contributor

@spolu spolu left a comment

Choose a reason for hiding this comment

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

LGTM

So we only have bad roles on expired memberships I understand, hence no impact 👍

@PopDaph PopDaph merged commit 400df8b into main May 23, 2024
3 checks passed
@PopDaph PopDaph deleted the fix-membership-role-member branch May 23, 2024 13:44
JulesBelveze pushed a commit that referenced this pull request May 24, 2024
flvndvd pushed a commit that referenced this pull request May 26, 2024
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