cancel
Showing results for 
Search instead for 
Did you mean: 

change namespace in custom content model

kbrady
Champ in-the-making
Champ in-the-making
We are currently looking to migrate our Alfresco platform from 3.2 to 4.0
As part of this upgrade we are looking to perform a tidy-up of a custom content model that was deployed with 3.2

The original namespace that was used for the custom content model is not accurate and we would like to update it to a more suitable name. For example

existing namespace               http://www.misleadingname.com/model/content/1.0

preferred namespace             http://www.correctname.com/model/content/1.0

Is it possible to do this or would we have to create a new version of any existing node so that the new node with have the correct namespace? We don't want to have to do this as we would then lose the version history, tags etc. that were attached to the original node. (This information could be copied across as well but it would mean allot more work which we are hoping to avoid…)
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

if you are able to whip up a small SQL script, you should be able to add this to the schema upgrade scripts already run by Alfresco and perform an in-place rename in the database during the first startup of your 4.0 platform. You would not lose any content / state / history, but probably would need to perform a full reindex (actually always when doing a significant version migration).

Take a look at the following:
  • bootstrap-context.xml for adding a post-upgrade script patch (and examples / existing patches)

  • patch-services-context.xml for declaring the patch in Alfresco terms (internal tracking)

  • the alf_namespace table in your database in order to derive your update SQL for the patch
Regards
Axel

kbrady
Champ in-the-making
Champ in-the-making
Hi Axel,

Thanks for this info. We'll test out the approach now.