Migration plans with package.xml and updating existing data in target umbraco site
I've been playing with automatic and custom migration plans (v. 9.5.4 for the time being) and I am struggling to find a way to make the migration update existing items on the target umbraco site.
New items are created with each update, but existing items (e.g. changes in doctypes or views included in the package.xml file) are not passing through.
What could I possibly be doing wrong? Is there a way to re-run the whole migration plan based on a package.xml file and update everything?
On the whole, the package systems is only additive (so it will only add new things).
If things are already created, they get left, I think it will add new properties to existing things but i am not 100% sure.
uSync and Umbraco.Deploy sync things so they will update existing items. In theory it is possible to run uSync in a package migration, but it would take a bit of code to achieved.
For anyone who would come across this issue, We had combined Creating custom package migration approach along with the awesome uSync package, specifically the uSync.Backoffice package, so basically as a package composer we opted into serializing the package related items into a specific location and run uSync import api on the migrate method, you can define your own safeguards and conditions when to run or skip the migration but this is the basic idea
The irony is that I had created nuget packages that would set up views via targets, and I ditched them in favor of the xml package thinking that it would update stuff (when ran via a custom migration plan).
So apart from uSync, I guess the only other alternative is pure code in order to update stuff, right? Should I dare ask whether there is some code generation tool for that somewhere? :)
Migration plans with package.xml and updating existing data in target umbraco site
I've been playing with automatic and custom migration plans (v. 9.5.4 for the time being) and I am struggling to find a way to make the migration update existing items on the target umbraco site.
New items are created with each update, but existing items (e.g. changes in doctypes or views included in the package.xml file) are not passing through.
What could I possibly be doing wrong? Is there a way to re-run the whole migration plan based on a package.xml file and update everything?
Hi,
On the whole, the package systems is only additive (so it will only add new things).
If things are already created, they get left, I think it will add new properties to existing things but i am not 100% sure.
uSync and Umbraco.Deploy sync things so they will update existing items. In theory it is possible to run uSync in a package migration, but it would take a bit of code to achieved.
Thanks, Kevin!
For anyone who would come across this issue, We had combined Creating custom package migration approach along with the awesome uSync package, specifically the uSync.Backoffice package, so basically as a package composer we opted into serializing the package related items into a specific location and run uSync import api on the migrate method, you can define your own safeguards and conditions when to run or skip the migration but this is the basic idea
https://gist.github.com/islamkhattab/70d6f9399db92c7c7537fed302caa8d0
Thanks Kevin, it's nice to know I'm not crazy :)
The irony is that I had created nuget packages that would set up views via targets, and I ditched them in favor of the xml package thinking that it would update stuff (when ran via a custom migration plan).
So apart from uSync, I guess the only other alternative is pure code in order to update stuff, right? Should I dare ask whether there is some code generation tool for that somewhere? :)
is working on a reply...