Kim 164906617 super user migrations #1940
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a column
is_superuser
to theusers
table.Adds all current Truss engineers as superusers (except two who have not been added yet as office_users).
Reviewer Notes
The user is created in middleware when the officeuser is created (not in migrations), so running prod migrations does not show
user
data, so this is difficult to verify.When I ran the local migration, it seemed to pass, but it is not setting
is_superuser
totrue
for me locally, although it did for @mikena-truss when she tried it out. Please uncomment the query in the local migration and see if theis_superuser
value gets applied locally.Setup
To check locally, uncomment the query in the
local_migration
file.If you already have your local db set up, run
make db_dev_migrate
. Then check your db to find 1) a newis_superuser
column. 2)SELECT * FROM users WHERE login_gov_email = 'officeuser1@example.com';
and seeis_superuser
set totrue
Code Review Verification Steps
bin/run-prod-migrations
- Note: does not show users table data because it's created in middleware instead of migrations.References