oddnoc/silverstripe-artefactcleaner

Find and optionally delete unused tables, columns and indexes in a SilverStripe database

Installs: 14 691

Dependents: 1

Suggesters: 0

Security: 0

Stars: 14

Watchers: 2

Forks: 5

Open Issues: 0

Type:silverstripe-vendormodule

4.0.2 2021-09-05 22:20 UTC

This package is auto-updated.

Last update: 2022-09-19 18:16:45 UTC


README

Find and optionally delete unused tables, columns and indexes in a SilverStripe database.

SilverStripe uses an automatic schema creation tool that leaves behind old and obsolete tables, columns, and indexes.

This package displays and optionally deletes those artefacts.

Installation

composer require --dev oddnoc/silverstripe-artefactcleaner

Usage

Invoke the task via the command line or the browser. If you are running mariadb version 10+, you can add ifexists=1 to the invocation. This will defend against errors should the column or index not exist at the time of the dropping=1 invocation.

vendor/bin/sake dev/tasks/ArtefactCleanTask
vendor/bin/sake dev/tasks/ArtefactCleanTask dropping=1
vendor/bin/sake dev/tasks/ArtefactCleanTask dropping=1 ifexists=1

Credits:

Version

4.0.2