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
void db push deletes empty auth tables without listing them #977
With auth enabled, confirming a void db push prompt deletes the auth tables that void db migrate created.
The prompt doesn't list them while they're empty, because Drizzle Kit lists a table only when it has rows.
On local D1 in Void 1.12.2, after migrating and adding a column to the app's schema, push shows this:
Warning Found data-loss statements:
· You're about to delete _void_migrations table with 2 items
THIS ACTION WILL CAUSE DATA LOSS AND CANNOT BE REVERTED
Do you still want to push changes?
The _void_migrations line is a separate bug (#976), also fixed in #935.
Choosing "Yes, I want to remove 1 table" also deletes user, session, account and verification.
void db generate passes the generated .void/better-auth-schema.ts to Drizzle Kit, but void db push doesn't.
So Kit treats the auth tables as tables the schema no longer has.
To reproduce:
In an empty directory, run npm install -D void@1.12.2 and npx void init. Keep the defaults, but choose "Skip deployment setup".
Add auth: { providers: ['email'] } inside defineConfig in void.config.ts.
Run npx void db generate and npx void db migrate.
Add note: text('note') to messages in db/schema.ts, run npx void db push, and choose "Yes, I want to remove 1 table".
Activity