HomePhabricator
Diffusion Comm 15c203dd660f

[keyserver/lib] Introduce a specialRoles enum and special_role column in MariaDB

Description

[keyserver/lib] Introduce a specialRoles enum and special_role column in MariaDB

Summary:
We introduce the specialRoles enum that maps a DEFAULT_ROLE to a specfic number we store in MariaDB. With this, we can run a migration that:

  1. Adds a special_role column to roles
  2. Update each row in roles to populate the special_role field if it is the defualt role

Addresses ENG-5831 and ENG-5832

Test Plan:
Ran the migration and confirmed it succeeded. Also checked my roles table to make sure the correct roles were updated

Screenshot 2023-11-23 at 11.17.35 AM.png (1×1 px, 663 KB)

Reviewers: atul, ginsu, tomek

Reviewed By: tomek

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D9961

Details

Provenance
rohanAuthored on Nov 24 2023, 8:53 AM
Reviewer
tomek
Differential Revision
D9961: [keyserver/lib] Introduce a specialRoles enum and special_role column in MariaDB
Parents
rCOMMef15fb4e402c: [lib] update `currentAsOf` for SIWE auth
Branches
Unknown
Tags
Unknown