Page MenuHomePhabricator

Make two ancient migrations fatal if they affect data

Authored by epriestley on Feb 6 2019, 4:57 PM.



Depends on D20106. Ref T6703. Since I plan to change the ExternalAccount table, these migrations (which rely on save()) will stop working.

They could be rewritten to use raw queries, but I suspect few or no installs are affected. At least for now, just make them safe: if they would affect data, fatal and tell the user to perform a more gradual upgrade.

Also remove an ALTER IGNORE TABLE (this syntax was removed at some point) and fix a %Q when adjusting certain types of primary keys.

Test Plan

Ran bin/storage upgrade --no-quickstart --force --namespace test1234 to get a complete migration since the beginning of time.

Diff Detail

rP Phabricator
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

epriestley created this revision.Feb 6 2019, 4:57 PM
Owners added a subscriber: Restricted Owners Package.Feb 6 2019, 4:57 PM
epriestley requested review of this revision.Feb 6 2019, 4:59 PM
epriestley updated this revision to Diff 48016.Feb 6 2019, 5:11 PM
  • Actually include the changes that arose during testing.
amckinley accepted this revision.Feb 6 2019, 5:46 PM
This revision is now accepted and ready to land.Feb 6 2019, 5:46 PM
This revision was automatically updated to reflect the committed changes.