Closed GuySartorelli closed 3 months ago
Retargetted to 4.0
so it gets included in the initial stable release.
Do a test I got this warning which is correct because I missed a step:
Migrating has_many relations. has_one relation 'SilverStripe\LinkField\Models\Link.MyPage still exists. Cannot migrate has_many relation 'Page.MyPhoneLinks'.
However the rest of the script still processed and now my data is possibly is a weird state. What should have happened is the script should have stopped immediately and told me to fix my issues.
I don't think it matters too much, since you should create a snapshot before starting which you can roll back to. But it is friendlier to rollback for you in this case, since has_many
is explicitly declared as opposed to the has_one
stuff.
I'll make this rollback for you.
Edit: This now throws an exception, which will trigger the rollback, and tell you that it rolled back.
Made requested changes - since they're all docs changes I haven't updated the CI run.
Broken builds are expected
Description
Provides a migration task and docs for upgrading from 2.x or 3.x to 4.x
Dependencies
Requires https://github.com/silverstripe/silverstripe-framework/pull/11171 for one of the unit tests.
Manual testing steps
has_one
relation toLink
and ahas_many
relation toLink
using gridfield to manage the has_many.^4
obviously you'll need to pull in this PR instead.Issues
Pull request checklist