A CakePHP v2.x console tool to run common MySQL database maintenance queries, including:
- CHECK
- ANALYZE
- OPTIMIZE
- REPAIR
Tables are locked with a READ lock for the check action, or WRITE locks for all other actions. This is to mimic the behavior of mysqlcheck as described here.
- CakePHP 2.x
- PHP 5.3+
$ composer require loadsys/cakephp-tablemaintenanceshellConsole/cake TableMaintenance.table_maintenance run {action} {table|ALL}The {action} param can be any one of:
checkanalyzeoptimizerepair
The {table} param can be any valid table name, or the special word ALL meaning all tables.
Adding the --quiet or -q flag will suppress output unless an error exists.
Please use GitHub Isuses for listing any known defects or issues.
When developing this plugin, please fork and issue a PR for any new development.
Loadsys Solutions 2018