reset-db-mysql
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

reset-db-mysql

Reset a MySQL database to an empty state recreating it if needed.

Install

npm i -D reset-db-mysql

Usage

Configure the reset command in your package.json file:

{
  "scripts": {
    "db:reset": "reset-db-mysql"
  }
}

Configure the DATABASE_URL in your local .env variables:

DATABASE_URL="mysql://USER:PASSWORD@HOST:3306/DATABASE"

And run the command every time you want to reset and remove all the tables of the database:

npm run db:reset

/reset-db-mysql/

    Package Sidebar

    Install

    npm i reset-db-mysql

    Weekly Downloads

    2

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    3.35 kB

    Total Files

    5

    Last publish

    Collaborators

    • ernestoalejo