Skip to content

Instantly share code, notes, and snippets.

View tomvanenckevort's full-sized avatar

Tom van Enckevort tomvanenckevort

View GitHub Profile
@tomvanenckevort
tomvanenckevort / umbraco v7 db cleanup.sql
Last active January 20, 2020 14:41 — forked from dampee/umbraco db cleanup.sql
Umbraco v7 Database cleanup. After pulling in an umbraco database from production, you don't need all history or log.
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate())
-- dump logs
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything
DELETE FROM umbracolog WHERE Datestamp < @createdDate
-- clean up old versions
DELETE FROM cmsPropertyData WHERE
@tomvanenckevort
tomvanenckevort / 00 - Umbraco Automatic Upgrade.md
Last active November 1, 2018 10:28
Automatic Umbraco upgrade module.

Will automatically execute a pending Umbraco upgrade on startup without prompting the user.