- Install Redis
- Copy the
.env.example
file to.env
and update the values as needed.
# this will setup all the tables & seed some data
npm run migrate:up
brew install nvm
nvm use
npm install
npm start
- To create a new migration file, run the following command:
npm run migrate:create <migration-name>
- Then you will see three files created in migrations folder. You need to update the
up
anddown
sqls in the*****-up.sql
and*****-down.sql
files respectively. No need to change/update thejs
file. - After that, you can run the migration using
npm run migrate
command. - In case you want to revert the last migration, you can run
npm run migrate:down1
command.