File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,10 +52,14 @@ jobs:
5252 # The expression maps the explicit environment input to exactly one repo
5353 # secret, so the job never holds another environment's database URL. An
5454 # unknown environment resolves to empty and the guard below fails the job.
55+ # MIGRATION_DATABASE_URL is the optional direct (non-pooled) DSN preferred
56+ # by migrate.ts; when the secret is unset it resolves to empty and the
57+ # script falls back to DATABASE_URL.
5558 - name : Apply database schema changes
5659 working-directory : ./packages/db
5760 env :
5861 DATABASE_URL : ${{ inputs.environment == 'production' && secrets.DATABASE_URL || inputs.environment == 'staging' && secrets.STAGING_DATABASE_URL || inputs.environment == 'dev' && secrets.DEV_DATABASE_URL || '' }}
62+ MIGRATION_DATABASE_URL : ${{ inputs.environment == 'production' && secrets.MIGRATION_DATABASE_URL || inputs.environment == 'staging' && secrets.STAGING_MIGRATION_DATABASE_URL || '' }}
5963 ENVIRONMENT : ${{ inputs.environment }}
6064 run : |
6165 if [ -z "$DATABASE_URL" ]; then
You can’t perform that action at this time.
0 commit comments