oddnoc/silverstripe-artefactcleaner

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

Maintainers

👁 odnoc

Package info

github.com/oddnoc/silverstripe-artefactcleaner

Type:silverstripe-vendormodule

pkg:composer/oddnoc/silverstripe-artefactcleaner

Statistics

Installs: 19 159

Dependents: 1

Suggesters: 0

Stars: 14

Open Issues: 3

4.1.0 2023-09-15 20:42 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ec605150a3b5f0e5a106d3c3ae411259da769057

frameworkdatabaseutilitysilverstripeobsolete

This package is auto-updated.

Last update: 2026-06-22 23:07:54 UTC


README

The Silverstripe Database Artefact Cleaner identifies and offers the option to remove unused tables, columns, and indexes in a Silverstripe database.

Over time, as the database schema evolves, Silverstripe's schema management tools may leave behind obsolete tables, columns, and indexes. This package assists developers by displaying these unnecessary artefacts and provides the option to delete them, ensuring a cleaner and optimized database.

Installation

To install the Artefact Cleaner, use the following composer command:

composer require --dev oddnoc/silverstripe-artefactcleaner

Usage

You can run the cleaner task using either the command line or directly through the browser. For MariaDB users (version 10+), the ifexists=1 option can be added to prevent errors if the targeted column or index doesn't exist during the dropping=1 operation.

Command Line

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

Browser

  • https://example.org/dev/tasks/ArtefactCleanTask
  • https://example.org/dev/tasks/ArtefactCleanTask?ifexists=1
  • https://example.org/dev/tasks/ArtefactCleanTask?dropping=1
  • https://example.org/dev/tasks/ArtefactCleanTask?dropping=1&ifexists=1

Acknowledgements

This package was inspired by silverstripe-dbplumber by smindel.

Version

4.1.0