Page MenuHomePhabricator

[keyserver] Run migration to populate special_role column for Admins
ClosedPublic

Authored by rohan on Nov 28 2023, 11:32 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 26, 8:24 AM
Unknown Object (File)
Tue, Nov 26, 6:21 AM
Unknown Object (File)
Fri, Nov 1, 11:41 AM
Unknown Object (File)
Wed, Oct 30, 8:51 PM
Unknown Object (File)
Oct 23 2024, 9:03 AM
Unknown Object (File)
Oct 23 2024, 2:57 AM
Unknown Object (File)
Oct 22 2024, 1:05 PM
Unknown Object (File)
Oct 19 2024, 3:26 PM
Subscribers

Details

Summary

Now that we have a specialRoles.ADMIN_ROLE enum, we should populate existing Admins in MariaDB to have this value in their special_role field. Following D9974, we already support populating new Admin's special_role field, so we don't need to worry about that.

There are two decent ways to check for an Admins role, either by role.name === Admins or roleIsAdminRole. The latter is a little more difficult since it requires us to construct RoleInfo to pass it in roleIsAdminRole, and makes it overall difficult to do a simple UPDATE statement. That's why I opted to do it through the first method (checking name)>

Addresses ENG-5837

Depends on D10075

Test Plan

Checked the MariaDB table after the migration and confirmed the Admins roles had the special_role field

Diff Detail

Repository
rCOMM Comm
Branch
special_role
Lint
No Lint Coverage
Unit
No Test Coverage