Skip to content

Keep route validation out of database pushes. - #1028

Merged
cpojer merged 2 commits into
mainfrom
codex/fix-db-push-auth-preparation
Dec 4, 2026
Merged

cpojer merged 2 commits into
mainfrom
codex/fix-db-push-auth-preparation

Conversation

@cpojer

@cpojer cpojer commented Dec 4, 2026

Copy link
Copy Markdown
Member

Follow-up to #1027.

void db push was running Void’s full route preparation to discover the Better Auth schema. A SvelteKit project using sourceDir: 'src' could build successfully and then fail to push its database schema because Void rejected a valid HEAD export in +server.ts.

Push now uses binding inference to discover auth, prepares the schema aliases Drizzle needs, and leaves route validation to the framework. It refreshes aliases in existing generated tsconfigs and removes stale auth files when auth is disabled. void db generate keeps its previous project preparation.

Regression tests cover SvelteKit with and without inferred auth, plus adding a schema to an existing project and removing auth. I also ran real CLI pushes against local D1 and PostgreSQL and verified that the schema change applied, the existing app row survived, and all four Better Auth tables remained.

@blacksmith-sh

This comment has been minimized.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
void-cloud Deployed Preview 4357180

Updated: Dec 4, 2026, 03:57 UTC | Dashboard

@cpojer
cpojer merged commit cd24b3d into main Dec 4, 2026
21 checks passed
@cpojer
cpojer deleted the codex/fix-db-push-auth-preparation branch December 4, 2026 04:11
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