Copied to clipboard

Flag this post as spam?

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


  • James Gaisford 22 posts 165 karma points
    Nov 10, 2015 @ 13:34
    James Gaisford
    0

    Creating a list of unused doc types

    Hi All,

    I am nearing the end of a long Umbraco project. Over the course of the project, the back office has become a little cluttered with document types.

    Does anyone know of any packages (seen Census, but no v7 support) or sql queries that would provide this information.

    Thanks, James.

  • Hendy Racher 863 posts 3849 karma points MVP 2x admin c-trib
    Nov 10, 2015 @ 15:02
    Hendy Racher
    103

    Hi James,

    Here's some SQL to get you started:

    -- find all unused docTypes
    -- these results may contain docTypes that are masters of used ones, so need to exclude these too....
    
    SELECT  A.nodeId as 'DocTypeId', 
            B.text AS 'Name',
            A.alias AS 'Alias'
    FROM    cmsContentType A 
            LEFT JOIN umbracoNode B ON A.nodeId = B.id
    WHERE   A.nodeId NOT IN (SELECT contentType FROM cmsContent)
    

    HTH, Hendy

  • James Gaisford 22 posts 165 karma points
    Nov 11, 2015 @ 08:41
    James Gaisford
    0

    Hi Hendy,

    That is amazing. Just what I was after.

    Thank you.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies