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
-- Gets the current date and deducts 1 month | |
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate()) | |
-- dump logs | |
DELETE FROM umbracolog WHERE Datestamp < @createdDate | |
-- clean up old versions where the updateDate is older then the date defined above | |
DELETE FROM cmsPropertyData WHERE | |
versionId NOT IN (SELECT versionId FROM cmsDocument WHERE published = 1 OR newest = 1) AND | |
contentNodeId IN (SELECT DISTINCT nodeID FROM cmsDocument) |
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
### Keybase proof | |
I hereby claim: | |
* I am genckastrati on github. | |
* I am gencvongenf (https://keybase.io/gencvongenf) on keybase. | |
* I have a public key whose fingerprint is 64F8 257A 406D D19E 12AF 1105 28BC BFF0 B019 CE44 | |
To claim this, I am signing this object: |
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
TRUNCATE TABLE umbracoLog | |
GO | |
TRUNCATE TABLE umbracoServer | |
GO | |
TRUNCATE TABLE umbracoUser2NodePermission | |
GO | |
TRUNCATE TABLE umbracoCacheInstruction | |
GO | |
TRUNCATE TABLE umbracoRedirectUrl | |
GO |