-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README, add license and editorconfig
- Loading branch information
Showing
3 changed files
with
97 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |