Repository navigation
fix(core): restore workspace.project_id for project ID remaps - #42169
DatScreamer wants to merge 4 commits into
Conversation
Some builds replaced the workspace table with a provider/binding schema and dropped project_id. Desktop then returned 500 from Project.migrateProjectId while loading sessions. Rebuild the control-plane workspace table when that column is missing, and skip the workspace remap if it is still absent.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Automated PR Cleanup Thank you for contributing to opencode. Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions. This PR was closed because it matched the following cleanup criteria:
PRs created within the last month are not affected by this cleanup. If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate. Thanks again for taking the time to contribute. |
Issue for this PR
Closes #42170
Type of change
What does this PR do?
Desktop crashed on session load with
Error: no such column: project_idinProject.migrateProjectId.Some builds replaced the
workspacetable with a provider/binding schema and droppedproject_id. Currentdevstill remaps project IDs withUPDATE workspace SET project_id = ..., which 500s and takes the renderer down.This adds a migration that rebuilds the control-plane
workspacetable whenproject_idis missing, and skips the workspace remap if that column is still absent. Session remaps still run.How did you verify your code works?
bun test test/database-migration.test.tsinpackages/corebun test test/project/project.test.tsinpackages/opencodeScreenshots / recordings
If this is a UI change, please include a screenshot or recording.
Checklist