feat(FN-191): replace manual migration comment with working db:migrate step (+4 more)
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled
Some checks failed
Sync dev → Gitea / Mirror dev to Gitea (push) Has been cancelled
Commits merged: - fix(FN-191): fix typecheck and lint issues for bootstrap changes - test(FN-191): complete Step 4 — update tests for new multi-table bootstrap logic - fix(FN-191): complete Step 3 — strengthen bootstrap canary to detect partial-baseline state - fix(FN-191): complete Step 2 — add dotenv bootstrap loader to migrate.ts - fix(FN-191): complete Step 1 — replace manual migration comment with working db:migrate step Files changed: apps/api/src/database/__tests__/migrate.spec.ts | 146 ++++++++++++++++++------ apps/api/src/database/migrate.ts | 124 ++++++++++++++------ scripts/deploy.sh | 12 +- 3 files changed, 203 insertions(+), 79 deletions(-) Fusion-Task-Id: FN-191
This commit is contained in:
@@ -51,13 +51,11 @@ log "Pre-rendering public pages..."
|
||||
pnpm prerender || log "WARNING: Pre-render failed (non-fatal, continuing deploy)"
|
||||
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 4: Database migrations ──
|
||||
log "Running database migrations..."
|
||||
cd apps/api
|
||||
pnpm db:migrate || error_exit "Database migration failed"
|
||||
cd "$DEPLOY_DIR"
|
||||
|
||||
# ── Step 5: Zero-downtime PM2 reload ──
|
||||
log "Reloading PM2 processes (zero-downtime)..."
|
||||
|
||||
Reference in New Issue
Block a user