This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Declare @folders TABLE (id int , path nvarchar(300) COLLATE SQL_Latin1_General_CP1_CI_AS) | |
insert into @folders | |
select | |
id, path, text | |
from | |
umbracoNode as N | |
INNER JOIN cmsContent as C ON C.nodeId = N.id | |
INNER JOIN cmsContentType as CT ON C.contentType = CT.nodeId and CT.alias = 'folder' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- native image picker editor data type => EF94C406-9E83-4058-A780-0375624BA7CA | |
DECLARE @dataTypeSearch NVARCHAR(50) | |
SET @dataTypeSearch = 'EF94C406-9E83-4058-A780-0375624BA7CA' | |
-- get all datatypes using the image picker tool | |
SELECT * FROM cmsDataType as DT | |
INNER JOIN umbracoNode N on N.id = DT.nodeId | |
WHERE DT.controlId LIKE @dataTypeSearch | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRAN | |
DECLARE @Nodes TABLE (NodeId int) | |
INSERT INTO @Nodes (NodeId) | |
SELECT top 1000 n.id | |
FROM cmsContent C | |
INNER JOIN cmsContentType CT ON C.contentType = CT.nodeId | |
INNER JOIN umbracoNode N ON C.nodeId = N.id | |
WHERE CT.alias = '[Your Document Type Alias Here]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Delete All Children of Specified Node ID */ | |
Declare @nodeId int | |
Set @nodeId = 18904 /* -20 = Content Recycle Bin, -21 = Media Recycle Bin */ | |
Declare @path varchar(500) | |
Set @path = (Select top 1 path from umbracoNode Where id = @nodeId) | |
/* If you want to delete the item as well, remove the comma from the following line. */ | |
Set @path = @path + ',%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRANSACTION | |
/* Delete Old Document Versions */ | |
Declare @keepOldVersionsCount int, @keepNewerThanDate datetime | |
Set @keepOldVersionsCount = 0 /* 0 Keeps published and newest only. */ | |
Set @keepNewerThanDate = getdate() /* getDate() or '2013-01-01' */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BEGIN TRANSACTION | |
SET NOCOUNT ON | |
DECLARE @Nodes TABLE (NodeId int) | |
INSERT INTO @Nodes (NodeId) | |
SELECT n.id | |
FROM umbracoNode n | |
WHERE n.path like '%-20%' and id!=-20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// uses the BuildCundleContent to create a file midification token, but we need to keep the BaseBuilder functionality, so we | |
/// take them from the ctr. | |
/// </summary> | |
public class SetAssetVersion : IBundleBuilder | |
{ | |
public IBundleBuilder BaseBuilder { get; set; } | |
public SetAssetVersion(IBundleBuilder baseBuilder) | |
{ |