-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TechDebt: System User Enhancements/Fixes #1316
Conversation
Openshift URLs for the PR Deployment: |
… be migrated and maintained more easily. Update api_patch_system_user.ts to do case-insensitive comparisons when finding a system user.
253e9d9
to
ae58f54
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1316 +/- ##
======================================
Coverage ? 49.21%
======================================
Files ? 639
Lines ? 17707
Branches ? 2787
======================================
Hits ? 8714
Misses ? 8409
Partials ? 584 ☔ View full report in Codecov by Sentry. |
I'm working on a migration that should remove duplicate users based on (user_identifier, user_identity_source_id) as a unique key and then patch any references to those removed system_user_ids. |
|
database/src/migrations/2024062611000000_remove_duplicate_users.ts
Outdated
Show resolved
Hide resolved
Update migration to combine queries into one pieces of sql.
70ed40e
to
a646855
Compare
Openshift URLs for the PR Deployment: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Quality Gate passedIssues Measures |
Links to Jira Tickets
https://apps.nrs.gov.bc.ca/int/jira/browse/SIMSBIOHUB-599
Description of Changes
Copy existing database functions to procedures folder, where they can be migrated and maintained more easily.
Update api_patch_system_user.ts to do case-insensitive comparisons when finding a system user.
Testing Notes
Should not be able to add a user with the same username as an existing system user (case-insensitive).
New migration to merge duplicate system_user records.
notes
column to indicate they were merged into another system user record.Other
Ran this query in Prod to see if there are any duplicates.
That
jbudzins
one was created today, so there might be more appearing if they keep trying and more records get added.