Skip to content

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

Open
bet4it wants to merge 1 commit into
tyql688:masterfrom
bet4it:fix/opencode-v2-workspace-branch
Open

fix: gracefully handle missing workspace.branch column after OpenCode v2 migration#22
bet4it wants to merge 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.

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.

1 participant