Skip to content

Commit

Permalink
chore: automatic migrations on release (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
bamorim authored Feb 22, 2021
1 parent 2de398e commit 42ac39a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ jobs:
- name: Run Typescript typechecking
run: npm run typecheck
- name: Setup database
run: npx prisma migrate deploy --preview-feature
run: npm run migrate-deploy
- name: Run Tests
run: npm test -- --detectOpenHandles --forceExit
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
release: npm run migrate-deploy
web: npm start
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cp prisma/.env.example prisma/.env
After making sure Postgresql is running, run the migrations to configure the database

```bash
npx prisma migrate dev --preview-feature
npm run migrate-dev
```

### Setup other variables
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"heroku-postbuild": "npm run build",
"test": "jest --runInBand",
"lint": "eslint '*/**/*.{js,ts,tsx}'",
"typecheck": "tsc --noEmit"
"typecheck": "tsc --noEmit",
"migrate-deploy": "prisma migrate deploy --preview-feature",
"migrate-dev": "prisma migrate dev --preview-feature"
},
"dependencies": {
"@material-ui/core": "^4.11.2",
Expand Down

0 comments on commit 42ac39a

Please sign in to comment.