Skip to content

fix: gracefully handle missing workspace.branch column after OpenCode v2 migration - #22

Merged
tyql688 merged 1 commit into
tyql688:masterfrom
bet4it:fix/opencode-v2-workspace-branch
Sep 2, 2026
Merged

fix: gracefully handle missing workspace.branch column after OpenCode v2 migration#22
tyql688 merged 1 commit into
tyql688:masterfrom
bet4it:fix/opencode-v2-workspace-branch

Conversation

@bet4it

@bet4it bet4it commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Running OpenCode v2 applies a workspace_domain migration that replaces the workspace table columns with provider bindings, removing the branch column. The old code only checked for the table's existence, so after a v2 run the query SELECT w.branch fails with "no such column". Switch to pragma_table_info('workspace') to check for the branch column itself, matching the existing pattern used for the version column in the same file. When the column is absent the branch info is simply omitted (git_branch = None), which is consistent with how Codex, Cursor, Kimi, Pi, and other providers behave.

@tyql688
tyql688 merged commit fc5d64c into tyql688:master Sep 2, 2026
3 checks passed
tyql688 added a commit that referenced this pull request Sep 2, 2026
feat: add GitHub Copilot provider

Conflict in providers/opencode/mod.rs resolved in favour of the
already-merged #22 fix; the PR's v2-schema regression test is kept.
@bet4it
bet4it deleted the fix/opencode-v2-workspace-branch branch September 4, 2026 15:03
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.

2 participants