Skip to content

Commit

Permalink
fix(migrations): set db uri correctly
Browse files Browse the repository at this point in the history
## Problem
When we swap to docker, we had to swap the `DB_URI` out, which meant that migrations ran using the command weren't working properly.

## Solution
inject env var at command. didn't create separate env file for this cos didn't wanna overload the `.env` files we have alr.
  • Loading branch information
seaerchin authored Dec 27, 2023
1 parent 3006942 commit e0aa387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"format-fix": "npx prettier --write .",
"prepare": "husky install",
"version": "auto-changelog -p && git add CHANGELOG.md",
"db:migrate": "source .env && npx sequelize-cli db:migrate",
"db:migrate:undo": "source .env && npx sequelize-cli db:migrate:undo",
"db:migrate": "source .env && DB_URI=postgres://isomer:password@localhost:5432/isomercms_dev && npx sequelize-cli db:migrate",
"db:migrate:undo": "source .env && DB_URI=postgres://isomer:password@localhost:5432/isomercms_dev && npx sequelize-cli db:migrate:undo",
"jump:staging": "source .ssh/.env.staging && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/isomercms-staging-bastion.pem",
"db:migrate:staging": "source .ssh/.env.staging && npx sequelize-cli db:migrate",
"jump:prod": "source .ssh/.env.prod && ssh -L 5433:$DB_HOST:5432 $SSH_USER@$SSH_HOST -i .ssh/isomercms-production-bastion.pem",
Expand Down

0 comments on commit e0aa387

Please sign in to comment.