Skip to content

fix(core): tolerate missing workspace names - #41610

Open
opencode-agent[bot] wants to merge 1 commit into
devfrom
migration-journal
Open

fix(core): tolerate missing workspace names#41610
opencode-agent[bot] wants to merge 1 commit into
devfrom
migration-journal

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • detect whether a legacy workspace table has the name column before rebuilding it
  • use an empty name only when that legacy column is absent
  • add a regression test reproducing the exact no such column: name failure

Why

Some drifted legacy databases contain the newer workspace fields but lack workspace.name. Migration 20260410174513_workspace-name unconditionally selected that column while rebuilding the table, so affected Desktop upgrades failed during local server startup.

The migration now keeps its existing rebuild behavior and changes only the copied name expression. Existing names are preserved; databases without the column receive the target schema's empty default value.

Closes #32430

Testing

  • bun test test/database-migration.test.ts (17 passed)
  • bun typecheck
  • bun x prettier --check src/database/migration/20260410174513_workspace-name.ts test/database-migration.test.ts
  • git diff --check

Requested by: @neriousy (Filip via Slack)

@opencode-agent opencode-agent Bot changed the title fix(core): recover legacy drizzle journals fix(core): tolerate missing workspace names Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop upgrade can fail on workspace migration

1 participant