Migrate existing bindings table for owner and repo columns #1463

Closed
opened 2026-10-27 13:40:30 +00:00 by sam · 0 comments
Owner

Bug Description

Archied v1.22.0 starts successfully against the existing production task database, but binding listing logs SQL logic error: no such column: owner. The database was created/migrated by an earlier release and its bindings table has no owner or repo columns, while current internal/store/bindings.go selects/inserts/updates both columns.

Steps to Reproduce

  1. Run archied v1.22.0 against an existing database upgraded from the previous release.
  2. Open the bindings dashboard or call the bindings listing path.
  3. Observe list bindings failed: SQL logic error: no such column: owner.

Expected Behavior

Existing databases migrate forward without data loss, and binding listing/creation/update works after upgrade.

Actual Behavior

The daemon stays up, but binding listing fails because the migration does not add the owner/repo columns required by the current binding store.

Evidence

  • Release: archied v1.22.0
  • Production DB: /home/sam/.local/share/archie/archie.db-tasks.sqlite
  • pragma user_version = 2
  • Existing bindings table has columns through updated_at, but no owner or repo.
  • Current code in internal/store/bindings.go references owner and repo.

Acceptance Criteria

  • Add an idempotent migration for owner/repo columns with safe defaults.
  • Preserve existing bindings and make them readable after upgrade.
  • Add regression coverage starting from the pre-owner/repo schema.
  • Verify binding list/create/update paths against both fresh and upgraded databases.
  • Do not reset or delete the production database.

Close reason

Resolved by commit 89f48a5 (PR #711); GitHub #709 closed. Stale-open copy recovered from carina during machine sync.


Imported from beads archie-core-n5fz · GitHub #709 · type bug · priority P1 · created 2026-09-03 · closed 2026-09-03

## Bug Description Archied v1.22.0 starts successfully against the existing production task database, but binding listing logs `SQL logic error: no such column: owner`. The database was created/migrated by an earlier release and its `bindings` table has no `owner` or `repo` columns, while current `internal/store/bindings.go` selects/inserts/updates both columns. ## Steps to Reproduce 1. Run archied v1.22.0 against an existing database upgraded from the previous release. 2. Open the bindings dashboard or call the bindings listing path. 3. Observe `list bindings failed: SQL logic error: no such column: owner`. ## Expected Behavior Existing databases migrate forward without data loss, and binding listing/creation/update works after upgrade. ## Actual Behavior The daemon stays up, but binding listing fails because the migration does not add the owner/repo columns required by the current binding store. ## Evidence - Release: archied v1.22.0 - Production DB: `/home/sam/.local/share/archie/archie.db-tasks.sqlite` - `pragma user_version = 2` - Existing `bindings` table has columns through `updated_at`, but no `owner` or `repo`. - Current code in `internal/store/bindings.go` references `owner` and `repo`. ## Acceptance Criteria - Add an idempotent migration for owner/repo columns with safe defaults. - Preserve existing bindings and make them readable after upgrade. - Add regression coverage starting from the pre-owner/repo schema. - Verify binding list/create/update paths against both fresh and upgraded databases. - Do not reset or delete the production database. ### Close reason Resolved by commit 89f48a5 (PR #711); GitHub #709 closed. Stale-open copy recovered from carina during machine sync. --- _Imported from beads `archie-core-n5fz` · GitHub #709 · type bug · priority P1 · created 2026-09-03 · closed 2026-09-03_
sam added the highbug labels 2026-10-27 13:40:30 +00:00
sam self-assigned this 2026-10-27 13:40:30 +00:00
sam closed this issue 2026-10-27 13:40:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#1463