reset-db-postgres
v0.1.1
Published
Reset a Postgres database to an empty state recreating it if needed.
Downloads
330
Readme
reset-db-postgres
Reset a Postgres database to an empty state recreating it if needed.
Install
npm i -D reset-db-postgresUsage
Configure the reset command in your package.json file:
{
"scripts": {
"db:reset": "reset-db-postgres"
}
}Configure the DATABASE_URL in your local .env variables:
DATABASE_URL="postgres://USER:PASSWORD@HOST:5432/DATABASE"And run the command every time you want to reset and remove all the tables of the database:
npm run db:reset