db:pull refuses when local has a migration production lacks #81

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

(session 43) bun run db:pull refuses whenever the local database has a migration production lacks, so it can't run on a branch with a new migration until it ships; an additive-only exception, or pulling before migrating, would help.

Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08.

(session 43) `bun run db:pull` refuses whenever the local database has a migration production lacks, so it can't run on a branch with a new migration until it ships; an additive-only exception, or pulling before migrating, would help. _Moved from docs/PROGRESS.md → Follow-ups → Later on 2026-11-08._
chris-kreidl commented 2026-11-08 20:17:08 +00:00 (Migrated from github.com)

What this is about. bun run db:pull copies production's data into your local database. It refuses if the two have different migrations, including when your branch has a new migration production doesn't have yet. So on a branch with a migration, you can't refresh local data until it ships.

Status (checked 2026-11-08): unchanged (scripts/db-pull.ts compares _prisma_migrations).

Fix: pull first, then apply the branch's migrations on top, or allow the pull when the local-only migrations are additive. Sessions 55 and 56 (#232, #233) both need fresh data on a branch with migrations, so this may come up there.

**What this is about.** `bun run db:pull` copies production's data into your local database. It refuses if the two have different migrations, including when your branch has a new migration production doesn't have yet. So on a branch with a migration, you can't refresh local data until it ships. **Status (checked 2026-11-08):** unchanged (`scripts/db-pull.ts` compares `_prisma_migrations`). **Fix:** pull first, then apply the branch's migrations on top, or allow the pull when the local-only migrations are additive. Sessions 55 and 56 (#232, #233) both need fresh data on a branch with migrations, so this may come up there.
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#81
No description provided.