Skip to content

Add object to list

Add object to list #55

name: Migrate database
on:
pull_request:
branches: ["main"]
paths: ["packages/database/migrations/**"]
jobs:
migrate:
env:
DATABASE_URL: ${{ secrets.PLANETSCALE_DATABASE_URL }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm ci
- run: npm run db:migrate
- name: Add comment
uses: mshick/add-pr-comment@v2
with:
message: |
## Database schema changes have been applied
The development database migrated with the migrations found in this branch.
**Warning**: All preview and development environments use the same database. This migration can affect all preview and development environments.
After merging this pull request, the development database changes will merge into the production database.