Just a tool to help cleanup some db with strong relationship.
npm i -g clean-mysql
clean-mysql --init
will create ./clean-mysql.config.json
{
"db": {
"host": "",
"database": "cattle",
"user": "cattle",
"password": ""
},
"tasks": {
"account": {
"state": "purged"
},
"environment": {
"state": "removed"
},
"instance": {
"state": [
"removed",
"purged"
]
},
"volume": {
"state": [
"purged"
]
}
}
}
clean-mysql
will run the tasks defined in config file
will just should the DELETE
sqls for checking.