Question

Relatively simple question:

If I have already created items to an existing schema and that changes for an upgrade how do I automate data migration?

That is, if my content model changes between revision 1.10 of my product and 1.11, how do I migrate the data while avoiding the "model is not compatiable" type of errors? For the purposes of this question, the alfresco version can be assumed to not have changed. However, resetting the Solr index and needing to re-index can be assumed to be needed!

thanks@

Was it helpful?

Solution

Make sure to execute the steps in the proper order. It is your responsibility and Alfresco does not offer much support here. For the sake of an example, let's assume you are removing a mandatory property. I would do something like this:

  1. Upgrade the model and make the property optional
  2. Remove the value from all content instances
  3. Upgrade the model with the property removed

This example should work without an index rebuild. Other changes, such as when you change how a property is indexed require an index update. If in doubt, rebuild the index.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top