There are migrated contents from CMS with content types person and Person used in enonic XP in same app. This causes issue when deploying via case insensitive file system and only one content type is included in the app. Is there any way to rename the content type without affecting the existing contents that has been migrated from CMS
Changing the content type can be done in two ways: By manually editing imported files, or programmatically using the Node API.
Create an export (for instance by using the Data Toolbox app)
Inside the exported data, using a text editor: do a search-replace that sets content with the old content type to get the new content type
Re-import the data
Using lib-node, connect() to the cms-repo using principals role:system-admin.
On the RepoConnection object that you’ve connected to, query() the content where type = “person”.
I can confirm that the manual method you describe works very well. Export it, open the zip and use Atom or Sublime or similar to search and replace inside all node.xml files for this: <string name="type">my.app.com:old_contenttype</string>
and replace it with this instead: <string name="type">my.app.com:new_contenttype</string>
Then create a new zip of all these folders and files, upload it with Data Toolbox, delete the old contents on the server and then run the import/load with Data Toolbox. This should give you what you need in very few steps and no coding.