Skip to content

Instantly share code, notes, and snippets.

@ProNotion
Last active June 15, 2018 09:53
Show Gist options
  • Save ProNotion/b6fce84c97e211976aca7f4fa73f92a3 to your computer and use it in GitHub Desktop.
Save ProNotion/b6fce84c97e211976aca7f4fa73f92a3 to your computer and use it in GitHub Desktop.
Migrates records from the umbracoRedirectUrl table to the icUrlTracker table
INSERT INTO [icUrlTracker] (OldUrl, RedirectNodeId, Notes)
SELECT
RIGHT(url, LEN(url) - 1),
(SELECT TOP (1)
id
FROM umbracoNode
WHERE (uniqueID = umbracoRedirectUrl.contentKey))
AS NodeId,
'Import from umbracoRedirectUrl table' AS Note
FROM umbracoRedirectUrl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment