Skip to content

Instantly share code, notes, and snippets.

View genckastrati's full-sized avatar
🌱

Genc Kastrati genckastrati

🌱
View GitHub Profile
@genckastrati
genckastrati / clean-db-Umbraco.sql
Last active May 3, 2022 16:40
Clean Database for Umbraco (7.14.x, 7.15.x)
-- 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)
@genckastrati
genckastrati / Keybase.proof
Created May 17, 2018 21:39
Keybase proof
### 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:
@genckastrati
genckastrati / clean-db-Umbraco-7.5.14.sql
Last active February 7, 2023 23:08
Clean Database for Umbraco 7.5.14 - This SQL script will clean up the database removing old versions for pages, audit and rollback information which can cause timeouts and delays for Courier
TRUNCATE TABLE umbracoLog
GO
TRUNCATE TABLE umbracoServer
GO
TRUNCATE TABLE umbracoUser2NodePermission
GO
TRUNCATE TABLE umbracoCacheInstruction
GO
TRUNCATE TABLE umbracoRedirectUrl
GO