Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm looking to clean up my Umbraco installation. Does anyone have a SQL script or package to find unused data types?
I'm happy to delete them one at a time through the back-end, I just want to find out which ones can go.
I don't know what SQL script can do it, but I would recommend you to try "Diplo God Mode" package - https://our.umbraco.org/projects/developer-tools/diplo-god-mode/
I can find out which data types are being used (or not)
I've written a SQL script myself. The God Mode package lists a few more as unused but the SQL gets most of them.
SELECT N.Text AS 'DataTypeName', DT.propertyEditorAlias AS 'EditorType', CT.Alias AS 'ContentTypeAlias', PT.Alias AS 'FieldName'
FROM [UmbracoDev].[dbo].[umbracoNode] N
LEFT JOIN [UmbracoDev].[dbo].[cmsPropertyType] PT ON PT.datatypeid = N.id
LEFT JOIN [UmbracoDev].[dbo].[cmsContentType] CT ON CT.nodeid = PT.ContentTypeId
INNER JOIN [UmbracoDev].[dbo].[cmsDataType] DT ON DT.nodeId = N.id
WHERE CT.Alias IS NULL
ORDER BY N.Text
But the package gives so much more and is built into the back-end so I will use that!
Thank you very much for sharing the script, I will use it on our latest project!
Have a nice day.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted