How to rename existing Reusable content type namespace and code name on QA SaaS?

2025/11/19 2:28 PM

I would like to rename an existing reusable content type that has already been migrated to the Kentico SaaS QA environment.

For example, I want to rename it from Testing.ImageWithCTA to Shared.ImageWithCTA.

Is it possible to retain the same database table after the rename?

Note: Testing.ImageWithCTA already has content created in the Content Hub and is currently assigned to a page through widgets.

Below is my repository.config file that I am using for the content type rename:

<?xml version="1.0" encoding="utf-8"?>
<RepositoryConfiguration Version="2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<IncludedObjectTypes>
		<!-- Include the content type definition -->
		<ObjectType>cms.contenttype</ObjectType>
		<!-- Holds reusable field schema definitions
		required to track schema changes. -->
		<ObjectType>cms.class</ObjectType>
	</IncludedObjectTypes>
	<ExcludedObjectTypes>
		<!-- Optional: specify exclusions if needed -->
	</ExcludedObjectTypes>
	<IncludedContentItemsOfType>
		<!-- Add items of the new content type -->
		<ContentType>Shared.ImageWithCTA</ContentType>
	</IncludedContentItemsOfType>
	<ObjectFilters>
		<!-- Include only the Shared.ImageWithCTA content type definition -->
		<IncludedCodeNames ObjectType="cms.contenttype">
			Shared.ImageWithCTA
		</IncludedCodeNames>
		<!-- Include reusable field schema data -->
		<IncludedCodeNames ObjectType="cms.class">
			CMS.ContentItemCommonData
		</IncludedCodeNames>
	</ObjectFilters>
	<RestoreMode>CreateUpdate</RestoreMode>
</RepositoryConfiguration>

Could someone advise me on the appropriate approach to update the existing reusable content type?

Environment

Tags:
Content management CI/CD SaaS

Answers

2025/11/20 2:35 PM

You ask a hard thing I'm afraid. The 'code name' has many pieces:

  1. SQL Table
  2. CMS_Class table records
  3. Any referencing Field configuration (CMS_Class, CMS_Form/CMS_Alternative Form, etc. May need to do a complete "Find all table/columns that have 'Testing.ImageWithCTA'")
  4. Code references
  5. CI/CD .xml files and folders

Is it possible to update all references to all of these things? Yes, but you would want to be VERY careful about it.

IF you decide to embark on this endeavor...There's a couple possibilities.

  1. You could try to use the CI Repository to simply copy + paste all of your entries over to a new content type, basically create the Shared version and copy everything into it, push it up, but then you would probably have duplicate Content GUIDs, and you would still have to update references.
  2. You could try to update the database's CMS_Class table along with any other table/columns and find all references to the old and update to the new, including the table name (and rename the table), and possibly other places, then update the code, then clear out CI/CD repository and rebuild it. Again i would do this with a local copy and make sure everything works first. The site IS technically just code files and database, so if you configure things properly it should work.

I would do #2 if i were hell-bent on doing it, but again, this is a dangerous thing to do.

2025/11/21 11:24 AM

I will into this further, agree it looks like challenging and dangerous one. Thank you for your response.

To response this discussion, you have to login first.