https://github.com/morlay/clean-mysql
https://github.com/morlay/clean-mysql
Last synced: 2 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/morlay/clean-mysql
- Owner: morlay
- Created: 2017-01-14T17:39:51.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-15T05:09:52.000Z (over 9 years ago)
- Last Synced: 2025-09-13T18:57:00.638Z (9 months ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Clean Mysql
Just a tool to help cleanup some db with strong relationship.
## Usage
```
npm i -g clean-mysql
```
#### Create Config
```
clean-mysql --init
```
will create `./clean-mysql.config.json`
```json
{
"db": {
"host": "",
"database": "cattle",
"user": "cattle",
"password": ""
},
"tasks": {
"account": {
"state": "purged"
},
"environment": {
"state": "removed"
},
"instance": {
"state": [
"removed",
"purged"
]
},
"volume": {
"state": [
"purged"
]
}
}
}
```
### Run
```
clean-mysql
```
will run the tasks defined in config file
#### `--dryRun`
will just should the `DELETE` sqls for checking.