Created
August 19, 2010 14:30
-
-
Save jonezy/538013 to your computer and use it in GitHub Desktop.
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
/* | |
prepends the client identifier to all occurences of a theme directory call | |
useful for when moving data from production to local dev | |
just update @ClientIdentifier to match the clients theme directory name. | |
WARNING: only run this locally, handwrite something if your going from local to prod | |
If you need to debug, just use this statement | |
SELECT CAST(REPLACE(CAST(HtmlText as nvarchar(max)), '/admin/theme/','/'+ @ClientIdentifier +'/admin/theme/') as ntext) FROM Html | |
*/ | |
DECLARE @ClientIdentifier nvarchar(max) | |
SET @ClientIdentifier = 'Xpert22' | |
UPDATE Html | |
SET HtmlText = CAST(REPLACE(CAST(HtmlText as nvarchar(max)), '/admin/theme/','/'+ @ClientIdentifier +'/admin/theme/') as ntext) | |
WHERE SUBSTRING(HtmlText, 0, 6) = '/admin' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment