Skip to content

morlay/clean-mysql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

{
  "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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published