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

[CPDLP-3631] Ensure we migrate all relevant timestamps from ECF #1848

Merged

Conversation

mooktakim
Copy link
Contributor

@mooktakim mooktakim commented Oct 23, 2024

Context

Ticket: https://dfedigital.atlassian.net/browse/CPDLP-3631

Changes proposed in this pull request

  • Cohort, Schedule, ParticipantIdChange and Statement migrations will use timestamps from ECF
  • Updated paper_trail
    • object field type is now json
    • object_changes added
    • added note field
  • Application & User
    • Can now include version_note which adds versions.note entry into versions
    • Migration will use ECF timestamps and include a version_note
    • If there has been any changes from ECF attrs, we set updated_at to Time.zone.now

Copy link
Collaborator

@ethax-ross ethax-ross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great just one question

@@ -25,6 +25,8 @@ class Application < Base
teacher_catchment_country
notes
funded_place
created_at
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here and in user, are we making sure this is covered?

Overwrite updated_at with the one from ECF, or set to the date of migration if anything changed from ECF

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated_at will be set to Time.now when:

  • Application ukprn is changed from ECF
  • User trn and email is changed from ECF

Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking good with a few comments, can we also run this in migration keen to see how the parity checks look like and as discussed and how long it will take with papertrail now :)

Copy link

Copy link
Collaborator

@cwrw cwrw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌 thanks mook

Copy link
Contributor

@leandroalemao leandroalemao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking very good tks @mooktakim 👍

app/models/user.rb Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Oct 25, 2024

@mooktakim mooktakim added this pull request to the merge queue Oct 25, 2024
Merged via the queue into main with commit e6b4ca0 Oct 25, 2024
18 checks passed
@mooktakim mooktakim deleted the 3631-ensure-we-migrate-all-relevant-timestamps-from-ecf branch October 25, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants