René's URL Explorer Experiment


Title: MySQL migration lock is skipped by `void db reset` and by Better Auth migrations · Issue #415 · voidzero-dev/void · GitHub

Open Graph Title: MySQL migration lock is skipped by `void db reset` and by Better Auth migrations · Issue #415 · voidzero-dev/void

X Title: MySQL migration lock is skipped by `void db reset` and by Better Auth migrations · Issue #415 · voidzero-dev/void

Description: Problem PR #413 adds one lock per MySQL database for migrations. CLI runs hold GET_LOCK. Deploys to the Void platform write a lease row in _void_migration_lock. Two paths still change the database outside that lock: void db reset / void ...

Open Graph Description: Problem PR #413 adds one lock per MySQL database for migrations. CLI runs hold GET_LOCK. Deploys to the Void platform write a lease row in _void_migration_lock. Two paths still change the database ...

X Description: Problem PR #413 adds one lock per MySQL database for migrations. CLI runs hold GET_LOCK. Deploys to the Void platform write a lease row in _void_migration_lock. Two paths still change the database ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MySQL migration lock is skipped by `void db reset` and by Better Auth migrations","articleBody":"## Problem\n\nPR #413 adds one lock per MySQL database for migrations. CLI runs hold `GET_LOCK`. Deploys to the Void platform write a lease row in `_void_migration_lock`. Two paths still change the database outside that lock:\n\n```\nvoid db reset / void db seed (MySQL)\n  drop every base table          \u003c- no lock; drops _void_migration_lock and _void_migrations too\n  applyMySqlMigrations           \u003c- takes the lock\n\nhosted migration handler (void deploy)\n  runMySqlMigrations             \u003c- lease held\n  lease.release()\n  runAuthMigrations              \u003c- no lease\n\nvp dev (migration plugin)\n  runMySqlMigrations             \u003c- GET_LOCK, released when it returns\n  runLocalVoidAuthMigrations     \u003c- no lock\n```\n\nWhat can go wrong:\n\n- **Reset during a deploy.** `void db reset` drops the lease table while a deploy holds a lease. The deploy's next renew fails (\"expired before this run finished\"), or its next statement fails on a missing table. Reset then applies the files again under its own lock, so both runs can apply the same file.\n- **Better Auth migrations at the same time.** They read `information_schema`, then `CREATE TABLE IF NOT EXISTS` or `ALTER TABLE ... ADD COLUMN`. MySQL has no `ADD COLUMN IF NOT EXISTS`, so two runs at once can fail with \"Duplicate column name\".\n\n`void db reset` asks for confirmation on a non-local host. The risk is highest when a shared database is reset during a deploy.\n\n## Repro\n\nFrom the code (not run):\n\n1. Start a `void deploy` whose MySQL migrations take a while, so it holds the lease.\n2. Run `void db reset --yes` against the same database.\n3. Reset drops `_void_migration_lock`. The deploy loses its lease.\n\nFor Better Auth: run two deploys of different projects on one database, both with Better Auth and a new auth column.\n\n## Cause\n\n- `packages/void/src/cli/db.ts:599-611` drops every table with no lock. The lock is taken only later, in `applyMySqlMigrations` (`:616`). `void db seed` calls the same function (`:647`).\n- `packages/void/src/runtime/migration-handler-mysql.ts:25-28` runs `runAuthMigrations()` after `runMySqlMigrations` returned. That function released the lease in its `finally` (`:113`).\n- `packages/void/src/plugin-migration.ts:75` runs the SQL migrations (lock released on return), then `:108-111` runs the auth migrations.\n- `packages/void/src/runtime/auth-migrations.ts:346` onward reads the tables, then creates or alters them; `:198-199` adds no `IF NOT EXISTS` for MySQL.\n\n## Suggested fix\n\n- Reset: take the same lock (`GET_LOCK` plus the lease check) before it drops tables, and keep it until the migrations are applied.\n- Run Better Auth migrations before the lock or lease is released, in both runners.\n\n## Evidence\n\n- Code read at the head of #413. Not run.\n- The lock is new in #413 (`02d9e9b49`). On main there is no lock at all, so these are gaps in the new lock, not regressions.\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-14T04:05:25Z","url":"https://github.com/voidzero-dev/void/issues/415"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:13e1e254-4c84-5e4d-0390-c084bf854d13
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE7CE:25A5E5:1BC147:257442:6AFB9BCB
html-safe-nonce15c26dc4e1e3c8d696bf3e309e4ffd3c397f7d67cce1ecd041a7c5fbec500e3b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFN0NFOjI1QTVFNToxQkMxNDc6MjU3NDQyOjZBRkI5QkNCIiwidmlzaXRvcl9pZCI6IjQzODMwNjUzMzE5NjI5NzcyMjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacf4a0bffb96bd5192f6f1b300b206b52359e1bb5b1eb9a39077b92e66394b044b
hovercard-subject-tagissue:5841737646
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/415/issue_layout
twitter:imagehttps://opengraph.githubassets.com/db26a38068df2a27ac400c99ae195969779120f71b4f5b29b9d2a612443a599e/voidzero-dev/void/issues/415
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/db26a38068df2a27ac400c99ae195969779120f71b4f5b29b9d2a612443a599e/voidzero-dev/void/issues/415
og:image:altProblem PR #413 adds one lock per MySQL database for migrations. CLI runs hold GET_LOCK. Deploys to the Void platform write a lease row in _void_migration_lock. Two paths still change the database ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameBrooooooklyn
hostnamegithub.com
expected-hostnamegithub.com
None3cefd19a936819d82cfb5279d50fb56fe79cb9ec30f0f807e04e89b0c58ffae1
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
release606800bdb1b81d125fc845bdcc262c9fe063fc8f
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/voidzero-dev/void/issues/415#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fvoidzero-dev%2Fvoid%2Fissues%2F415
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%2F415
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/415
Reloadhttps://github.com/voidzero-dev/void/issues/415
Reloadhttps://github.com/voidzero-dev/void/issues/415
voidzero-devhttps://github.com/voidzero-dev
voidhttps://github.com/voidzero-dev/void
Codehttps://github.com/voidzero-dev/void
Issues30 (30)https://github.com/voidzero-dev/void/issues
Pull requests14 (14)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/415
New issuehttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/415
#413https://github.com/voidzero-dev/void/pull/413
MySQL migration lock is skipped by void db reset and by Better Auth migrationshttps://github.com/voidzero-dev/void/issues/415#top
#413https://github.com/voidzero-dev/void/pull/413
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/415#issue-5841737646
#413https://github.com/voidzero-dev/void/pull/413
fix(void): make PostgreSQL and MySQL void/db work across frameworks, builds and deploys #413https://github.com/voidzero-dev/void/pull/413
fix(void): make PostgreSQL and MySQL void/db work across frameworks, builds and deploys #413https://github.com/voidzero-dev/void/pull/413
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/415#event-33193183267
Brooooooklynhttps://github.com/Brooooooklyn
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/415#event-33206287803
fix(void): split MySQL migration files and hold the migration lock th…https://github.com/voidzero-dev/void/commit/8d66ca986b0c7b98d939b59ea516dfd8b3aa9fef
https://docs.github.com/articles/closing-issues-via-commit-messages
8d66ca9https://github.com/voidzero-dev/void/commit/8d66ca986b0c7b98d939b59ea516dfd8b3aa9fef
fix(void): split MySQL migration files and hold the migration lock th…https://github.com/voidzero-dev/void/commit/84c814058b83a33ae87a71b68c5562c5bab854d9
https://docs.github.com/articles/closing-issues-via-commit-messages
84c8140https://github.com/voidzero-dev/void/commit/84c814058b83a33ae87a71b68c5562c5bab854d9
Brooooooklynhttps://github.com/Brooooooklyn
completedhttps://github.com/voidzero-dev/void/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
b58300fhttps://github.com/voidzero-dev/void/commit/b58300ff84cfdd29ae66557640903613435e872f
on Oct 14, 2026https://github.com/voidzero-dev/void/issues/415#event-33218437740
Sign up for freehttps://github.com/signup?return_to=https://github.com/voidzero-dev/void/issues/415
Sign in to commenthttps://github.com/login?return_to=https://github.com/voidzero-dev/void/issues/415
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.