==== Background
To facilitate works on mentor dashboard, we need to move mentor/mentee relationship to a separate table. For more details, see {T275773}.
==== Task objective
Do the mentor/mentee relationship migration on Wikimedia wikis.
==== Checklist
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_OLD | SCHEMA_COMPAT_READ_OLD` both on beta and prod (no-op; [678386](https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/678386))
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD` on beta and make sure relationship is written to both places ([678389](https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/678389/))
[X] Run `mwscript extensions/GrowthExperiments/maintenance/migrateMentorMenteeRelationship.php` on all beta wikis with GE installed
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW` on beta and watch for breakages
[X] Wait for {T278573} to be completed
[X] Wait for the [maintenance script](https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/675192) to get merged
[X] Wait for 1.36-wmf.1 to be everywhere (https://versions.toolforge.org/)
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD` on `testwiki` and make sure mentor/mentee relationship data is written to database ([680302](https://gerrit.wikimedia.org/r/680302))
[X] Run `mwscript extensions/GrowthExperiments/maintenance/migrateMentorMenteeRelationship.php --wiki=testwiki` and make sure user_properties-powered data and growthexperiments_mentor_mentee data match (at least the number of rows)
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW` on `testwiki` and make sure there are no obvious breakages ([680303](https://gerrit.wikimedia.org/r/680303)). Alert the QA engineer.
[X] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD` on all production wikis and make sure mentor/mentee relationship data is written to database ([680304](https://gerrit.wikimedia.org/r/680304))
[ ] Run `mwscript extensions/GrowthExperiments/maintenance/migrateMentorMenteeRelationship.php` on all wikis in `growthexperiments.dblist` in production
[ ] Set migration stage to `SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW` on production
[ ] Wait a week to ensure there are no breakages
[ ] Set migration stage to `SCHEMA_COMPAT_WRITE_NEW | SCHEMA_COMPAT_READ_NEW` both in beta and production (**this is the point of no return**)
[ ] Change the extension-provided default to `SCHEMA_COMPAT_WRITE_NEW | SCHEMA_COMPAT_READ_NEW`
[ ] Wait for the change to be train-deployed everywhere
[ ] Stop setting migration stage in operations/mediawiki-config