fix(deploy): remove pnpm db:push from automated deploy
The interactive Drizzle prompt on destructive schema changes (column/index drops with row-level data warnings) cannot be answered over a non-interactive SSH session, causing the deploy to hang. Schema migrations now run manually so they get the review they need. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -47,11 +47,13 @@ log "Pre-rendering public pages..."
|
||||
pnpm prerender || log "WARNING: Pre-render failed (non-fatal, continuing deploy)"
|
||||
cd "$DEPLOY_DIR"
|
||||
|
||||
# ── Step 4: Database migrations (safe push) ──
|
||||
log "Running database migrations (drizzle-kit push)..."
|
||||
cd apps/api
|
||||
pnpm db:push || error_exit "Database migration failed"
|
||||
cd "$DEPLOY_DIR"
|
||||
# ── Step 4: Database migrations (manual) ──
|
||||
# Schema migrations are NOT run automatically.
|
||||
# `pnpm db:push` is interactive and may prompt for destructive changes
|
||||
# (column drops, etc.) which cannot be answered over a non-interactive
|
||||
# SSH session. Run schema changes manually from apps/api:
|
||||
# pnpm db:push # interactive, dev/staging
|
||||
# pnpm db:generate # produce a versioned migration (recommended for prod)
|
||||
|
||||
# ── Step 5: Zero-downtime PM2 reload ──
|
||||
log "Reloading PM2 processes (zero-downtime)..."
|
||||
|
||||
Reference in New Issue
Block a user