ballerine-io / ballerine

Open-source infrastructure and data orchestration platform for risk decisioning

Home Page:https://www.ballerine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update User Table Schema

alonp99 opened this issue · comments

Task Definition

What?
Update the user table in the database to include a new column role and mark the existing roles column as deprecated.

Why?
To transition from potentially multiple roles (implied by the plural) to a singular, definitive role for each user, aligning with RBAC standards.

How?

  • Alter the user table to add a new column named role with an integer data type.
  • Use a database migration script for this alteration.
  • In the codebase, add a deprecation comment to the roles column definition to notify developers:
    /** @deprecated use role instead */
  • Ensure the migration script includes setting a default role (e.g., VIEWER) for existing users without a defined role.

Acceptance Criteria:

  • role column exists in the user table.
  • roles column is marked as deprecated in the codebase.
  • Existing users without a role have been assigned the VIEWER role.