Skip to content

fix(better-auth): model migration ordering explicitly - #1379

Open
focux wants to merge 1 commit into
alchemy-run:mainfrom
focux:fix/action-output-env-plan
Open

fix(better-auth): model migration ordering explicitly#1379
focux wants to merge 1 commit into
alchemy-run:mainfrom
focux:fix/action-output-env-plan

Conversation

@focux

@focux focux commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Better Auth placed its migration Action output in the host env only to establish ordering. Because Action outputs remain unresolved during planning, every later plan kept the host Worker dirty.

Track ordering-only outputs separately from provider props and use that dependency channel for migrations. This preserves migration → host ordering without deploying a runtime env value.

Tests:

  • pnpm test test/action.test.ts --profile testing
  • bun alchemy-test test/SQLite.test.ts --profile testing
  • pnpm lint:providers

Closes #1378

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you change plan, you gotta add corresponding plan.test.ts cases to document and enforce this

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.

Worker plans never converge with Better Auth migrations

2 participants