fix: use real DATABASE_URL from .env for migrations in deploy workflow
The deploy job was overwriting DATABASE_URL with a placeholder for prisma:generate, but this persisted when db:migrate ran later, causing ER_ACCESS_DENIED_ERROR. Since the stage directory already symlinks to the live .env, the real DATABASE_URL is available without override.
This commit is contained in:
1 parent
525f58cd24
commit
822dfd6a1c
1 file changed
+2
-2
@@ -336,8 +336,8 @@ jobs:
|
||||
echo "STAGE DATABASE_POOL_SIZE=${DATABASE_POOL_SIZE}"
|
||||
|
||||
pnpm install --frozen-lockfile
|
||||
export DATABASE_URL="${DEPLOY_DATABASE_URL:-mysql://placeholder:please@localhost/placeholder}"
|
||||
# prisma generate does not need a live DB connection.
|
||||
# Stage symlinks to live .env, so DATABASE_URL is already the real value.
|
||||
# prisma generate only needs the URL for client generation — no live DB connection.
|
||||
pnpm prisma:generate
|
||||
export BCRYPT_ROUNDS=4
|
||||
pnpm typecheck
|
||||
|
||||
Reference in new issue
Block a user