René's URL Explorer Experiment


Title: `void db reset` does not drop views: MySQL reset and seed fail when a migration creates one · Issue #421 · voidzero-dev/void · GitHub

Open Graph Title: `void db reset` does not drop views: MySQL reset and seed fail when a migration creates one · Issue #421 · voidzero-dev/void

X Title: `void db reset` does not drop views: MySQL reset and seed fail when a migration creates one · Issue #421 · voidzero-dev/void

Description: Problem The app has a migration that creates a view. void db migrate works. Then void db reset (or void db seed) fails when it re-applies that migration. Dialect View over a table View that reads no table D1 / SQLite (local) works works ...

Open Graph Description: Problem The app has a migration that creates a view. void db migrate works. Then void db reset (or void db seed) fails when it re-applies that migration. Dialect View over a table View that reads n...

X Description: Problem The app has a migration that creates a view. void db migrate works. Then void db reset (or void db seed) fails when it re-applies that migration. Dialect View over a table View that reads n...

Opengraph URL: https://github.com/voidzero-dev/void/issues/421

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`void db reset` does not drop views: MySQL reset and seed fail when a migration creates one","articleBody":"## Problem\n\nThe app has a migration that creates a view. `void db migrate` works. Then `void db reset` (or `void db seed`) fails when it re-applies that migration.\n\n| Dialect | View over a table | View that reads no table |\n| --- | --- | --- |\n| D1 / SQLite (local) | works | works |\n| PostgreSQL | works | **fails** |\n| MySQL | **fails** | **fails** |\n\nMySQL 8.4:\n\n```\n$ void db reset --yes\n■ migration 0001_view.sql failed: Table 'user_names' already exists\n```\n\nPostgreSQL 17, with `CREATE VIEW app_info AS SELECT 'v1'::text AS version;`:\n\n```\n$ void db reset --yes\n■ migration 0002_const_view.sql failed: relation \"app_info\" already exists\n```\n\nOn MySQL the database is then left half reset. `users` and `_void_migrations` are created again, the old view is still there, and only `0000_init.sql` is recorded. `void db migrate` and later resets fail with the same error until the view is dropped by hand.\n\nThis is older than #413: 6b47270e3 fails the same way (`■ Table 'user_names' already exists`).\n\n## Repro\n\n`void.config.ts` has `database: 'mysql'`, and `.env` has `DATABASE_URL=mysql://root:root@127.0.0.1:3306/app`.\n\n```sql\n-- db/migrations/0000_init.sql\nCREATE TABLE users (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL);\n-- db/migrations/0001_view.sql\nCREATE VIEW user_names AS SELECT name FROM users;\n```\n\n```\nvoid db migrate          # ✓ Applied 2 migrations.\nvoid db reset --yes      # ■ migration 0001_view.sql failed: Table 'user_names' already exists\n```\n\n## Cause\n\nReset lists only tables, drops them, and then runs every migration file again. Views are never listed:\n\n```\nvoid db reset (MySQL)\n  list tables WHERE table_type = 'BASE TABLE'   -> users, _void_migrations\n                                                   (user_names is a VIEW, so it is not listed)\n  DROP TABLE users, _void_migrations              MySQL keeps the view\n  CREATE TABLE IF NOT EXISTS _void_migrations     empty, so every file is pending\n  0000_init.sql                                   ok\n  0001_view.sql  CREATE VIEW user_names ...       -> ER 1050 already exists\n```\n\nLine numbers are on main, b58300ff8:\n\n- MySQL: `packages/void/src/cli/db.ts:606-618` runs\n  `SELECT table_name AS table_name FROM information_schema.tables WHERE table_schema = DATABASE() AND table_type = 'BASE TABLE'`,\n  then ``DROP TABLE IF EXISTS `\u003cname>` `` for each row. MySQL does not drop a view when its base table is dropped.\n- PostgreSQL: `packages/void/src/cli/db.ts:584-589` runs\n  `SELECT tablename FROM pg_tables WHERE schemaname = 'public'`, then `DROP TABLE IF EXISTS \"\u003cname>\" CASCADE`.\n  CASCADE removes views that depend on those tables. A view that does not depend on one stays.\n- Reapply: `db.ts:622` → `packages/void/src/migrations/runner-mysql.ts:163-179`. For PostgreSQL, `db.ts:590` → `runner-pg.ts:52-67`.\n- `void db seed` calls the same `resetDatabase()` (`db.ts:654`).\n- D1 / SQLite deletes the database file instead (`db.ts:631-633`), so it is not affected.\n\n## Suggested fix\n\n- MySQL: query `information_schema.tables` without the `BASE TABLE` filter. Run `DROP VIEW IF EXISTS` for rows of type `VIEW`, and `DROP TABLE IF EXISTS` for the rest. Keep skipping `_void_migration_lock`.\n- PostgreSQL: also drop the views and materialized views in `public` (`pg_views`, `pg_matviews`) with `CASCADE`.\n\nWorkaround today: drop the view by hand, then run `void db reset` again.\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nhttps://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH\n","author":{"url":"https://github.com/Brooooooklyn","@type":"Person","name":"Brooooooklyn"},"datePublished":"2026-10-14T11:00:46Z","url":"https://github.com/voidzero-dev/void/issues/421"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:75935d0c-bac8-2f78-8f3d-c6385b03e053
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9B98:1B8129:1BF9D16:25FF73C:6AFB9702
html-safe-nonce02e7df5055bed04339030333109a089303b7bcd0a8b5ff04bbff9e526269b2fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qjk4OjFCODEyOToxQkY5RDE2OjI1RkY3M0M6NkFGQjk3MDIiLCJ2aXNpdG9yX2lkIjoiNTMxMjM3OTQ5MTgzNjQ2Njk0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac7fbeab84394e957dde7e426d539fa499ef134a1c6a0db2959c324ac7e12d1f8b
hovercard-subject-tagissue:5846592209
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/voidzero-dev/void/421/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f97ec118437b522479b0b0564c65ca645ccfadb4e6ec18ab7e4b9ced05f8bc7d/voidzero-dev/void/issues/421
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f97ec118437b522479b0b0564c65ca645ccfadb4e6ec18ab7e4b9ced05f8bc7d/voidzero-dev/void/issues/421
og:image:altProblem The app has a migration that creates a view. void db migrate works. Then void db reset (or void db seed) fails when it re-applies that migration. Dialect View over a table View that reads n...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBrooooooklyn
hostnamegithub.com
expected-hostnamegithub.com
None4f01efe06174a5ba6342fd58e42d02295e0675bedbb465d6bef2dbaec8e46556
turbo-cache-controlno-preview
go-importgithub.com/voidzero-dev/void git https://github.com/voidzero-dev/void.git
octolytics-dimension-user_id149750581
octolytics-dimension-user_loginvoidzero-dev
octolytics-dimension-repository_id1164437080
octolytics-dimension-repository_nwovoidzero-dev/void
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1164437080
octolytics-dimension-repository_network_root_nwovoidzero-dev/void
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea52db8866b6543b4e83730cd6a6b1360f1a9e4dc
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/421#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F421
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F421
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=voidzero-dev%2Fvoid
Reloadhttps://github.com/voidzero-dev/void/issues/421
Reloadhttps://github.com/voidzero-dev/void/issues/421
Reloadhttps://github.com/voidzero-dev/void/issues/421
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues31 (31)https://github.com/voidzero-dev/void/issues
Pull requests16 (16)https://github.com/voidzero-dev/void/pulls
Discussionshttps://github.com/voidzero-dev/void/discussions
Actionshttps://github.com/voidzero-dev/void/actions
Security and qualityhttps://github.com/voidzero-dev/void/security
Insightshttps://github.com/voidzero-dev/void/pulse
https://github.com/voidzero-dev/void
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/421
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/421
void db reset does not drop views: MySQL reset and seed fail when a migration creates onehttps://github.com/voidzero-dev/void/issues/421#top
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/Brooooooklyn
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/421#issue-5846592209
#413https://github.com/voidzero-dev/void/pull/413
6b47270https://github.com/voidzero-dev/void/commit/6b47270e316c4a263c27103d2dedf5220748f22a
b58300fhttps://github.com/voidzero-dev/void/commit/b58300ff84cfdd29ae66557640903613435e872f
Claude Codehttps://claude.com/claude-code
https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufHhttps://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH
Brooooooklynhttps://github.com/Brooooooklyn
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/421#event-33218875647
https://github.com/Brooooooklyn
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 15, 2026https://github.com/voidzero-dev/void/issues/421#issuecomment-6191398156
#435https://github.com/voidzero-dev/void/pull/435
b89a733https://github.com/voidzero-dev/void/commit/b89a7333cee4ecd123490697a74f0321cb348a46
Brooooooklynhttps://github.com/Brooooooklyn
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 15, 2026https://github.com/voidzero-dev/void/issues/421#event-33329017545
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/421
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/421
bugSomething isn't workinghttps://github.com/voidzero-dev/void/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.