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(user_roles): migrations for backfilling user_roles entity_id #6837

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

Riddhiagrawal001
Copy link
Contributor

@Riddhiagrawal001 Riddhiagrawal001 commented Dec 15, 2024

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

This PR ensures that the entity_id is backfilled in the user_roles table, preventing issues for V1 users when switching organizations and logging in.

Additional Changes

  • This PR modifies the API contract
  • This PR modifies the database schema
  • This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Through dashboard

  • login to v1 user
  • invite the same user to another org
  • Switch organization

Checklist

  • I formatted the code cargo +nightly fmt --all
  • I addressed lints thrown by cargo clippy
  • I reviewed the submitted code
  • I added unit tests for my changes where possible

@Riddhiagrawal001 Riddhiagrawal001 requested a review from a team as a code owner December 15, 2024 16:02
Copy link

Review changes with  SemanticDiff

@Riddhiagrawal001 Riddhiagrawal001 self-assigned this Dec 15, 2024
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Dec 15, 2024
@Riddhiagrawal001 Riddhiagrawal001 added C-bug Category: Bug A-users Area: Users and removed M-database-changes Metadata: This PR involves database schema changes labels Dec 15, 2024
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Dec 15, 2024
ThisIsMani
ThisIsMani previously approved these changes Dec 16, 2024
racnan
racnan previously approved these changes Dec 16, 2024
Copy link
Contributor

@racnan racnan left a comment

Choose a reason for hiding this comment

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

Can we add a comment in previous up.sql mentioning the migration is incomplete without this one.

@Riddhiagrawal001 Riddhiagrawal001 dismissed stale reviews from racnan and ThisIsMani via fb4f829 December 16, 2024 09:29
@Riddhiagrawal001
Copy link
Contributor Author

Can we add a comment in previous up.sql mentioning the migration is incomplete without this one.

Added the comment in the previous migration

@likhinbopanna likhinbopanna added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 986de77 Dec 16, 2024
20 of 22 checks passed
@likhinbopanna likhinbopanna deleted the entity-id-backfill-user-roles branch December 16, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-bug Category: Bug M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(user_roles): migrations for backfilling user_roles entity_id
5 participants