cambis / silverstripe-pruner
A simple developer utility to clear database tables.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 2
Type:silverstripe-vendormodule
Requires
- php: ^7.4 || ^8.0
- silverstripe/framework: ^4.0 || ^5.0
README
A simple developer utility to clear database tables. This module provides a configurable task that truncates database tables inside of a transaction.
Prerequisites 🦺
php ^7.4 || ^8.0 silverstripe/framework ^4.0 || ^5.0
Installation 👷♀️
Install via composer.
composer require --dev cambis/silverstripe-pruner
Configuration 🚧
Create a configuration file.
--- Name: app_pruner --- Cambis\SilverstripePruner\Task\PruneSelectedORMTablesTask: # List the fqn names of the DataObjects you want to truncate truncated_tables: - My\Record\To\Truncate # Defaults to false, add this line if you want to run the task in a production environment can_run_in_production: true
Usage 🏃🏃🏃
vendor/bin/sake dev/tasks/prune-selected-orm-tables confirm=1