Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim Watts 90 posts 394 karma points
    Mar 15, 2017 @ 11:15
    Tim Watts
    0

    Hi all,

    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.

    Thanks,

    Tim

  • Alex Skrypnyk (skrypnyk.dev) 6061 posts 23313 karma points MVP 6x admin c-trib
    Mar 15, 2017 @ 11:31
    Alex Skrypnyk (skrypnyk.dev)
    100

    Hi Tim

    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)

    Thanks,

    Alex

  • Tim Watts 90 posts 394 karma points
    Mar 15, 2017 @ 11:55
    Tim Watts
    1

    Thanks Alex.

    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!

    Tim

  • Alex Skrypnyk (skrypnyk.dev) 6061 posts 23313 karma points MVP 6x admin c-trib
    Mar 15, 2017 @ 11:56
    Alex Skrypnyk (skrypnyk.dev)
    0

    Hi Tim

    Thank you very much for sharing the script, I will use it on our latest project!

    Have a nice day.

    /Alex

Please Sign in or register to post replies

Write your reply to:

Draft