Skip to content

Commit

Permalink
Update README, add license and editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
chronon committed Feb 16, 2018
1 parent 729f695 commit 8b3cf87
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .editorconfig
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
21 changes: 21 additions & 0 deletions LICENSE.md
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.
59 changes: 58 additions & 1 deletion README.md
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

0 comments on commit 8b3cf87

Please sign in to comment.