@astrocoders/migrathor
v1.0.0
Published
Create a migrathorconfig.js file in the root directory of your project. For example:
Downloads
3
Keywords
Readme
Usage
Create a migrathorconfig.js file in the root directory of your project. For example:
require('dotenv').config()
module.exports = {
host: process.env.PG_HOST,
port: Number(process.env.PG_PORT),
user: process.env.PG_USER,
database: process.env.PG_DATABASE,
password: process.env.PG_PASSWORD,
databaseConfigFolder: 'pgSql',
}
So you can use yarn migrathor <cmd>
Commands
migration
- create a new migration file in ${databaseConfigFolder}/migrations
migrate
- run the latest migration
rollback
- undoes the last migration