oddnoc/silverstripe-artefactcleaner

Find and optionally delete disused tables and fields in a SilverStripe database

Installs: 301

Dependents: 0

Stars: 5

Watchers: 2

Forks: 1

Open Issues: 1

Type: silverstripe-module

2.0.0 2015-12-18 22:14 UTC

README

Find and optionally delete disused tables and fields in a SilverStripe database.

During development of a SilverStripe application it is common to delete a data object class or remove a field from a data object. This leaves obsolete columns and tables in your database. Because these columns or tables may contain data that you still want, the SilverStripe framework doesn't delete those automatically. This task displays the obsolete columns and tables in the form of SQL DROP and ALTER commands. It also provides a way to delete them. If you do that, there is no undo, so always make a backup first.

This task runs only on the CLI, so it needs an empty parameter to do the actual dropping:

sake dev/tasks/ArtefactCleanTask
sake dev/tasks/ArtefactCleanTask '' dropping=1

To install:

composer require --dev oddnoc/silverstripe-artefactcleaner:^2.0.0

Version: 2.0.0