Skip to content

fix: repair workspace upgrade path#141

Merged
ibourgeois merged 3 commits intomainfrom
codex/fix-140-workspace-upgrade-repair
Mar 27, 2026
Merged

fix: repair workspace upgrade path#141
ibourgeois merged 3 commits intomainfrom
codex/fix-140-workspace-upgrade-repair

Conversation

@ibourgeois
Copy link
Copy Markdown
Contributor

Summary

  • add a repair migration for existing installs that applied the earlier workspace migration shape
  • backfill legacy workspace rows into connection_workspaces
  • sync the Surreal workspace sequence after backfill so new workspaces allocate the next id safely

Testing

  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan test --compact tests/Feature/WorkspaceManagementTest.php

Fixes #140

Copilot AI review requested due to automatic review settings March 27, 2026 14:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a repair migration to make upgrades from an older workspace schema safe by backfilling legacy workspaces rows into connection_workspaces and (for Surreal) syncing the id sequence so new workspace inserts don’t collide.

Changes:

  • Add a repair migration that creates connection_workspaces if missing, backfills from legacy workspaces, and updates the Surreal sequence.
  • Add a feature test that simulates the legacy schema and asserts the backfill populates connection_workspaces.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
database/migrations/2026_03_27_135040_repair_connection_workspaces_table.php Creates/backfills connection_workspaces from legacy workspaces and attempts to sync Surreal sequence.
tests/Feature/WorkspaceManagementTest.php Adds regression coverage for the legacy-to-new backfill behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ibourgeois ibourgeois merged commit 0045853 into main Mar 27, 2026
2 checks passed
@ibourgeois ibourgeois deleted the codex/fix-140-workspace-upgrade-repair branch March 27, 2026 14:20
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.

fix: sync Surreal workspace sequences after workspace backfill

2 participants