cancel
Showing results for 
Search instead for 
Did you mean: 

Migrating existing model content to 5.1 custom model

maobolgi
Champ in-the-making
Champ in-the-making
Hi Everybody,

I created a custom model for my 5.0 installation by deploying a WAR file. It works fine and it allowed me to add a few custom aspects with the required properties. However, in order to limit future maintenance, I would like to recreate my model in the 5.1 Model Manager.

What would be the easiest way to migrate 1:1 the content of the properties in the Aspects of my custom model into a 5.1 Model Manager created custom model (identical to mine)?

Thanks for the support!

Maurizio
5 REPLIES 5

douglascrp
World-Class Innovator
World-Class Innovator
If i'm not wrong, you can import your model using the Model Manager interface.
Have you tried it already?

maobolgi
Champ in-the-making
Champ in-the-making
Yes, but the import functionality only works with the Model Manager exported models. Moreover, my issue would be to ensure that the content of the fields is migrated, hence it should either be by an incredible chance that all the DB columns would match after recreating the new model or some script that would copy everything to the new fields.

Hi,

Well there are two ways of going about this.
1. You can drop the current model into 5.1 (I have done it, and the models work); and the hook the new instance 5.1 into the old database. Alfresco has a clever way of updating its schemas without corrupting the data inside. In that way you will have all your data with the models deployed.
2. You can drop/re-create the model for 5.1 and then use CMIS to migrate the content with properties to 5.1.

Hope this helps.

maobolgi
Champ in-the-making
Champ in-the-making
Hi,

recreating the model in the model manager by dropping the jar works indeed! Alfresco il really cool.

Solved! Thanks.

andrewlove
Champ in-the-making
Champ in-the-making

Hi.

I have the same issue. I have a 5.1 repo with over 200,000 docs that use a custom content model I have previously deployed in an amp file (model defined in XML, etc.).

I have defined the exact same model in a 5.2 dev instance of Alfresco using the model manager and have exported the model.

If I remove the model definition from the amp file, redeploy the amp and restart Alfresco. Then if I try to import the model using Model Manager I get an error saying it cannot be imported becaus ethe model already exists.

Could you give me any more detail on what you did to migrate? What did you delete (you refer to dropping the jar)?

Many thanks