02-08-2019 12:38 AM
I have the custom content model with the namespace (rma:model) and the namespace prefix "rma". This model is used by more than a million documents. Alfresco record management uses the "rma" namespace prefix. Because of the namespace prefix collision, I am not able to install the RM Module 2.5.2 in Alfresco 5.1.4. I am trying to change the namespace prefix through the database but I am not able to locate prefix in any of the tables in the Alfresco database.
My plan is to update the prefix to "uarma" in the database and update the custom content model in the content store to reflect the new prefix.
Any insight or suggestions on this?
Thanks in advance.
02-08-2019 02:16 AM
Hi Suresh Joshee,
The problem which you describe in this post is very critical. First of all, you have to make a full backup of you contentstore, database, alfresco-global.properties and war files.
I think it isn’t good idea update manually the namespace in database. Probably you will have inconsistent data and Alfresco crashes.
I should duplicate all your model. For example, if you have a type named rma:mytype, you should create another named uarma:mytype.
After that, you should install the new model and you should decelop a javascript script for migrate nodes from “old type” to “new type”. In this script, you should copy all of properties from old node to new node and delete old node.
When you finish this task, you can remove elenents with namespace rma from your model and install new version of your custom module. Before that, please be sure that nodes with rma namespace don’t remain in your Alfresco.
I hope my answer can be useful for you.
Regards,
Sergio.
02-08-2019 02:30 PM
Thank you, Sergio, for your quick response.
I am planning to do this way but due to versioning, the content store will be increased by 1.5 TB.
Regards
Suresh
02-08-2019 05:09 AM
Since Alfresco does not store the prefix for a namespace in the database, it should actually be quite simple to change the prefix (unless you are using the Content Model Manager). Simply modify your model definition XML to use a different prefix for the affected namespace and restart your Alfresco server with the new model XML. Since prefixes are resolved at runtime using the database stored namespace and the model provided prefix, Alfresco should now transparently use the new prefix.
Note:
02-08-2019 02:32 PM
Thank you, Axel,
I will try this and let you know.
Regards
Suresh
Explore our Alfresco products with the links below. Use labels to filter content by product module.