Preview branches share one database #219

Open
opened 2026-11-08 18:21:28 +00:00 by chris-kreidl · 1 comment
chris-kreidl commented 2026-11-08 18:21:28 +00:00 (Migrated from github.com)

Preview branches share one database, and build-time migrate deploy applies each branch's migrations to it. Fine while branches run one at a time; if two branches with different migrations ever overlap, reset the preview database or give each branch its own (Prisma Postgres per branch).

Moved from docs/history.md → Parked follow-ups on 2026-11-08.

Preview branches share one database, and build-time `migrate deploy` applies each branch's migrations to it. Fine while branches run one at a time; if two branches with different migrations ever overlap, reset the preview database or give each branch its own (Prisma Postgres per branch). _Moved from docs/history.md → Parked follow-ups on 2026-11-08._
chris-kreidl commented 2026-11-08 20:20:03 +00:00 (Migrated from github.com)

What this is about. Every preview deploy (vercel deploy --target preview) uses the same preview database, and each build applies its branch's migrations to it. If two branches with different migrations were previewed in turn, the second could find a schema it doesn't expect.

Status (checked 2026-11-08): unchanged. Fine while branches are previewed one at a time.

Relevant soon: sessions 55 and 56 (#232, #233) both have migrations, and #233 is tested on preview. Run them in order, and reset the preview database if they ever overlap.

**What this is about.** Every preview deploy (`vercel deploy --target preview`) uses the *same* preview database, and each build applies its branch's migrations to it. If two branches with different migrations were previewed in turn, the second could find a schema it doesn't expect. **Status (checked 2026-11-08):** unchanged. Fine while branches are previewed one at a time. **Relevant soon:** sessions 55 and 56 (#232, #233) both have migrations, and #233 is tested on preview. Run them in order, and reset the preview database if they ever overlap.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ckreidl/trainer#219
No description provided.