Skip to content

PM-6126: apply forum database migrations before startup - #10

Merged
jmgasper merged 1 commit into
developfrom
fix/PM-6126-forum-topic-detail
Sep 3, 2026
Merged

PM-6126: apply forum database migrations before startup#10
jmgasper merged 1 commit into
developfrom
fix/PM-6126-forum-topic-detail

Conversation

@jmgasper

@jmgasper jmgasper commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • run Prisma migrations before starting Forums API v6
  • include the Prisma schema, migration history, configuration, and CLI in the production image
  • rebuild the approved Prisma schema engine after script-free production dependency installation, so startup does not depend on a runtime download

Root cause

The reactions rollout added the PostReaction table and made topic detail reads query it, but the production image only included the generated Prisma client and started NestJS directly. A deployment whose database had not been migrated could therefore create and list topics successfully while every topic detail request failed, matching PM-6126.

The next deployment will apply the pending reactions migration before accepting traffic. Any future migration failure will stop the container instead of leaving the API partially available against an older schema.

Validation

  • pnpm lint
  • pnpm build
  • sh -n appStartUp.sh
  • production Docker image builds successfully
  • production image contains the PM-6126-dependent reactions migration and an executable Alpine Prisma schema engine
  • container startup invokes migrations and fails before NestJS when the database is intentionally unreachable
  • full Jest run: 121 passed, 3 skipped; the two failures in forums-moderation.integration.spec.ts reproduce unchanged on origin/develop and are unrelated to this deployment-only change

@jmgasper
jmgasper merged commit 804efe2 into develop Sep 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant