From 8b3cf87238941f98b23a1e9b47fad2eed6eb463a Mon Sep 17 00:00:00 2001 From: Gregory Gaskill Date: Fri, 16 Feb 2018 12:34:00 -0500 Subject: [PATCH] Update README, add license and editorconfig --- .editorconfig | 18 ++++++++++++++++ LICENSE.md | 21 ++++++++++++++++++ README.md | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 .editorconfig create mode 100644 LICENSE.md diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..774f35b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,18 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Tab indentation (no size specified) +[{*.js,*.php,*.ctp}] +indent_style = tab + +# Matches all .json and .yaml/.yml +[{*.json,*.yaml,*.yml}] +indent_style = space +indent_size = 2 diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..39f0799 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +# The MIT License (MIT) + +Copyright (c) 2018 Loadsys Web Strategies + +> Permission is hereby granted, free of charge, to any person obtaining a copy +> of this software and associated documentation files (the "Software"), to deal +> in the Software without restriction, including without limitation the rights +> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +> copies of the Software, and to permit persons to whom the Software is +> furnished to do so, subject to the following conditions: +> +> The above copyright notice and this permission notice shall be included in +> all copies or substantial portions of the Software. +> +> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +> THE SOFTWARE. diff --git a/README.md b/README.md index db09e76..216184f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,59 @@ # CakePHP-TableMaintenanceShell -A CakePHP console tool to run common MySQL database maintenance queries + +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](https://dev.mysql.com/doc/refman/5.6/en/mysqlcheck.html). + +## Requirements + +* CakePHP 2.x +* PHP 5.3+ + + +## Installation + +```shell +$ composer require loadsys/cakephp-tablemaintenanceshell +``` + +## Usage + +```shell +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](https://github.com/loadsys/CakePHP-TableMaintenanceShell/issues) for listing any known defects or issues. + +### Development + +When developing this plugin, please fork and issue a PR for any new development. + +## License + +[MIT](https://github.com/loadsys/CakePHP-TableMaintenanceShell/blob/master/LICENSE.md) + + +## Copyright + +[Loadsys Solutions](http://www.loadsys.com) 2018