Skip to content
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

Bug 1926081 - Add modification_time datetime column to profiles table denoting when the profile was last updated #2345

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

dklawren
Copy link
Collaborator

Currently we would have to look at the last entry in profiles_activity and/or audit_log to see when a user profile was last updated. It will be much simpler if we just create a new column to track this timestamp and not have to look in one or more other places. I will also need to create a script to go back and fill in the new timestamp with the current value from the different activity tables. This pull request adds the new column, updates it when the user is updated and also populates the column with the proper values.

@dklawren dklawren requested a review from cgsheeh October 23, 2024 21:28
Bugzilla/User.pm Show resolved Hide resolved
@dklawren dklawren requested a review from cgsheeh October 31, 2024 16:39
@dklawren
Copy link
Collaborator Author

I have updated the migration code to fix some logic issues discovered during recent deployment. Please review the new changes.

  • Fixed a bug in the migration code that was not looping over the userids from the profiles table properly.
  • Also check for the existence of the creation_ts column and if it exist add it to the list of possible modification_ts values.
  • Take the same code from the migration function and put into a run-once fixup script to run on production to finish the migration. This is required because the profiles.migration_ts column has been added to the profiles table and the migration code will not be ran. The fixup script will finish the migration that was aborted before and not need to be ran again.

@dklawren dklawren merged commit 891f3c2 into mozilla-bteam:master Nov 4, 2024
17 checks passed
@dklawren dklawren deleted the 1926081 branch November 4, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants