Skip to content

Conversation

apoorvdixit88
Copy link
Contributor

@apoorvdixit88 apoorvdixit88 commented Jul 17, 2024

Type of Change

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

Description

DB changes in user_roles

  • New Columns
    • version
    • entity_id
    • entity_type
    • profile_id
  • Changes
    • merchant_id is now nullable
    • org_id is now nullable

Additional Changes

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

Motivation and Context

Closes #5352

How did you test it?

All these APIs should work without giving 500.

  • User - Signup w/ merchant id

  • User - Signin

  • User - Signin Token Only

  • User - Connect Account

  • User - Reset Password

  • User - Invite Multiple

  • User - Resend Invite

  • User - Accept Invite from Mail

  • User - Accept Invite from Mail Token only

  • User - Switch Merchant

  • User - Switch List

  • User - Merchants List

  • User - Merchants Select List

  • User - List

  • User - Verify Email

  • User - Verify Email Token only

  • User - Update User details

  • User Role - Update

  • User Role - Transfer Ownership

  • User Role - Accept Invite - POST

  • User Role - Accept Invite - PUT

  • User Role - Delete

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

@apoorvdixit88 apoorvdixit88 added C-refactor Category: Refactor A-users Area: Users labels Jul 17, 2024
@apoorvdixit88 apoorvdixit88 self-assigned this Jul 17, 2024
@apoorvdixit88 apoorvdixit88 requested review from a team as code owners July 17, 2024 14:02
@hyperswitch-bot hyperswitch-bot bot added the M-database-changes Metadata: This PR involves database schema changes label Jul 17, 2024
@ThisIsMani ThisIsMani self-assigned this Jul 24, 2024
@apoorvdixit88 apoorvdixit88 requested review from jarnura and racnan July 24, 2024 12:23
ALTER TABLE user_roles ALTER COLUMN org_id DROP NOT NULL;
ALTER TABLE user_roles ALTER COLUMN merchant_id DROP NOT NULL;

ALTER TABLE user_roles ADD COLUMN profile_id VARCHAR(255);
Copy link
Member

Choose a reason for hiding this comment

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

Make profile_id,entity_id as varchar(64)

jarnura
jarnura previously approved these changes Jul 24, 2024
racnan
racnan previously approved these changes Jul 24, 2024
@ThisIsMani ThisIsMani dismissed stale reviews from racnan and jarnura via eba8e4d July 25, 2024 08:01
@ThisIsMani ThisIsMani requested review from jarnura and racnan July 25, 2024 08:02
@likhinbopanna likhinbopanna added this pull request to the merge queue Jul 25, 2024
Merged via the queue into main with commit 0330aff Jul 25, 2024
@likhinbopanna likhinbopanna deleted the make-org-merchant-id-nullable-user-role branch July 25, 2024 10:56
pixincreate added a commit that referenced this pull request Jul 30, 2024
* 'main' of github.com:juspay/hyperswitch:
  refactor(router): remove `connector_account_details` and `connector_webhook_details` in merchant_connector_account list response (#5457)
  feat: add env variable for enable key manager service (#5442)
  chore(version): 2024.07.29.0
  feat(payments): support sort criteria in payments list (#5389)
  refactor(connector):  add amount conversion framework to placetopay (#4988)
  feat(connector): [Bambora APAC] add mandate flow (#5376)
  ci: set code owners for payment methods files (#5453)
  refactor(opensearch): Add Error Handling for Empty Query and Filters in Request (#5432)
  chore: address Rust 1.80 clippy lints (#5447)
  feat(connector): [FISERV] Move connector to hyperswitch_connectors (#5441)
  ci: add support for just hack_v2 check for PRs (#5426)
  fix: added created at and modified at keys in PaymentAttemptResponse (#5412)
  refactor(merchant_account_v2): recreate id for `merchant_account` v2  (#5439)
  chore(version): 2024.07.26.0
  feat(events): forward the tenant configuration as part of the kafka message (#5224)
  refactor(connector):  add amount conversion framework to payone (#4981)
  refactor(user_roles): make org and merchant id nullable (#5353)
  fix(euclid): change the address taken in SessionFlowRouting from shipping to billing address (#5435)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-users Area: Users C-refactor Category: Refactor M-database-changes Metadata: This PR involves database schema changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor: migrate user roles table to support v2
5 participants