Skip to content

fix(cli): protect migration journals and report incomplete db push - #935

Open
hyfdev wants to merge 1 commit into
mainfrom
fix/db-push-migrations-table
Open

hyfdev wants to merge 1 commit into
mainfrom
fix/db-push-migrations-table

Conversation

@hyfdev

@hyfdev hyfdev commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

On D1, once migrations have been applied, adding a table and running void db push offers to rename Void's migration journal, _void_migrations, into the new table, and choosing "create table" then asks to delete it.

When a push prompt can't open or is declined, void db push still prints "✓ Database schema pushed." and exits 0, though nothing was pushed.

Push now leaves Void's journal tables alone, and an incomplete push exits 1 with a next step.

Before, adding a table without a terminal:

Error: Interactive prompts require a TTY terminal (process.stdin.isTTY or process.stdout.isTTY is false). …
✓ Database schema pushed.

After, the same push:

[✓] Changes applied
✓ Database schema pushed.

A push that still needs a prompt, such as renaming a table, without a terminal:

Error: Interactive prompts require a TTY terminal (process.stdin.isTTY or process.stdout.isTTY is false). …
Database schema push did not complete. For prompts, run `void db push` in a terminal. To review changes, use `void db generate` and `void db migrate`.

Void ran Drizzle Kit with no table filter, so it treated the journal as an app table; the generated config now excludes Void's journal tables.

Drizzle Kit exits 0 even when a prompt fails or is declined, so Void now reads its output and treats any ending other than its completion line as incomplete.

void db generate gets the same check, and a push with nothing to change no longer prints the success line.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-db-push-migrations-table-void-cloud.voidzero-docs.workers.dev (commit 12bf065)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2c67f013-void-cloud.voidzero-docs.workers.dev 12bf065 2026-11-27T00:30:59.616Z Visit the dashboard ↗

@hyfdev
hyfdev marked this pull request as ready for review November 27, 2026 00:40
Copilot AI balanced review requested due to automatic review settings November 27, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

This branch has not been deployed

No deployments
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.

2 participants