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

Migrate Worldwide Organisations to Editionable Worldwide Organisations #8971

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brucebolt
Copy link
Member

@brucebolt brucebolt commented Apr 18, 2024

This migrates all WorldwideOrganisation records (and their associations) to EditionableWorldwideOrganisation records.

The migration is done inside a transaction, with a check of various things (e.g. that the presented content remains the same) so the entire migration can be aborted if any part fails.

I've gone against our convention of not adding code comments, as I feel they are useful here in explaining what is actually being migrated in each step.

Trello card

@brucebolt brucebolt force-pushed the migration-worldwide-orgs branch 27 times, most recently from 156a0ff to bb6a510 Compare April 25, 2024 16:18
@brucebolt brucebolt force-pushed the migration-worldwide-orgs branch 3 times, most recently from 7eb4b19 to cf7a8f7 Compare April 29, 2024 13:37
@brucebolt brucebolt force-pushed the migration-worldwide-orgs branch 10 times, most recently from 4a1ff12 to f8d15a0 Compare May 9, 2024 11:19
@brucebolt brucebolt force-pushed the migration-worldwide-orgs branch 7 times, most recently from 9009c00 to b62621b Compare May 15, 2024 15:02
@brucebolt brucebolt force-pushed the migration-worldwide-orgs branch 9 times, most recently from 4b87469 to dfb0f88 Compare May 29, 2024 08:50
This migrates non-editionable worldwide organisations and all their
attributes to be editionable.

An integrity check of the migrated content (comparing Publishing API
presenter output) is carried out for all things that are migrated. If
any part of the integrity checks fail, the entire transaction will
rollback and the migration will fail.

Note 1: this migration is irreversible.

Note 2: there are some legacy worldwide organisations that were created
prior to some validations being put in place, therefore they have
invalid values. The migration is skipping validations where necessary
(using different strategies, as required) to ensure the values are
unchanged when migrating over. Users will be alerted to the invalid
content next time they edit the document.

Note 3: we cannot use a data migration as they do not have access to
presenters and helpers that are needed to perform the consistency check
before commiting the transaction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant