You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(cli): exclude Void migration tables and fail on aborted db push - #1033
Excludes Void's internal migration and D1 metadata tables (_void_migrations, _void_migration_lock, _migrations, _cf_KV, d1_migrations) via tablesFilter when running void db push, preventing Drizzle Kit from asking to delete the migration journal after void db migrate.
Also wraps void db push consistently so declined prompts (All changes were aborted) and non-TTY prompt failures (Interactive prompts require a TTY terminal) exit with code 1 instead of 0.
Verification
vp fmt packages/void/src/cli/db.ts
vp lint on modified files (0 warnings, 0 errors)
vp run --filter ./packages/void typecheck
vp test run packages/void/test/unit/db-studio-remote.test.ts packages/void/test/unit/drizzle-config.test.ts packages/void/test/unit/db-args.test.ts
P2 — A PostgreSQL push can silently skip schema changes. With an application-owned d1_migrations table, the second push tried to recreate it, skipped an unrelated column addition, and exited 0. Drizzle Kit filters the live database but still reads the table from the app schema. Scope the filter by dialect and handle explicitly declared tables on both sides of the comparison. Filter passed to PostgreSQL
P2 — Two D1 recovery tables remain unprotected. A local push preserved _void_migrations but deleted _void_migration_attempts and _void_migration_fences without prompting when they were empty. Include both in the D1 filter. Table list
P3 — A successful push can report failure. When a schema logged All changes were aborted as part of a longer message, the column was added successfully but the CLI exited 1. Match Drizzle Kit’s complete abort diagnostic. Output check
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Excludes Void's internal migration and D1 metadata tables (
_void_migrations,_void_migration_lock,_migrations,_cf_KV,d1_migrations) viatablesFilterwhen runningvoid db push, preventing Drizzle Kit from asking to delete the migration journal aftervoid db migrate.Also wraps
void db pushconsistently so declined prompts (All changes were aborted) and non-TTY prompt failures (Interactive prompts require a TTY terminal) exit with code1instead of0.Verification
vp fmt packages/void/src/cli/db.tsvp linton modified files (0 warnings, 0 errors)vp run --filter ./packages/void typecheckvp test run packages/void/test/unit/db-studio-remote.test.ts packages/void/test/unit/drizzle-config.test.ts packages/void/test/unit/db-args.test.tsFixes #976