I'm planning to rename one of my custom content types, so that I can free up its name for a new Orchard module I am working on. I'm hoping to use Schema.ExecuteSql in a migration class as suggested by this SO answer, but I want to make sure I know all of the updates I will need to do.
So far, I understand that I need to update fields in the following tables:
- Orchard_Framework_ContentTypeRecord
- Settings_ContentTypeDefinitionRecord
- Settings_ContentPartDefinitionRecord
Also, here is my general plan for the update SQL I will need to run:
DECLARE @From VARCHAR(50) = 'OriginalName'
DECLARE @To VARCHAR(50) = 'NewName'
BEGIN TRANSACTION
BEGIN TRY
UPDATE [Current_Orchard_Framework_ContentTypeRecord]
SET [Name] = @To
WHERE [Name] = @From
UPDATE [Current_Settings_ContentTypeDefinitionRecord]
SET [Name] = @To, [DisplayName] = @To
WHERE [Name] = @From
UPDATE [dbo].[Current_Settings_ContentPartDefinitionRecord]
SET [Name] = @To + 'Part'
WHERE [Name] = @From + 'Part'
--COMMIT TRANSACTION
ROLLBACK TRANSACTION /*Rollback while testing*/
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION
END CATCH
Is there anything else I am missing that will need to be renamed to fully rename my content type?