loadsys/cakephp-tablemaintenanceshell

A CakePHP console tool to run common MySQL database maintenance queries

1.0.0 2018-02-16 17:34 UTC

This package is not auto-updated.

Last update: 2024-10-27 07:04:28 UTC


README

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.

Requirements

  • CakePHP 2.x
  • PHP 5.3+

Installation

$ composer require loadsys/cakephp-tablemaintenanceshell

Usage

Console/cake TableMaintenance.table_maintenance run {action} {table|ALL}

The {action} param can be any one of:

  • check
  • analyze
  • optimize
  • repair

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.

Contributing

Reporting Issues

Please use GitHub Isuses for listing any known defects or issues.

Development

When developing this plugin, please fork and issue a PR for any new development.

License

MIT

Copyright

Loadsys Solutions 2018