[Bug] Repair missing IMAP append claim-token column on upgraded databases #82

Closed
opened 2026-07-29 00:19:23 +02:00 by zemion · 1 comment
Owner

Failure

An upgraded PostgreSQL database can be stamped at Campaign head while imap_append_attempts.claim_token is absent. Campaign workspace/report loading then fails with psycopg.errors.UndefinedColumn.

Repair

  • Add an idempotent forward repair migration after d8b3e2c1f4a5.
  • Preserve the column on downgrade because it belongs to the earlier claim migration.
  • Cover missing-column and repeated-upgrade behavior.
  • Verify the reported campaign/version workspace summary against PostgreSQL.

Implemented and verified locally; close after push.

<!-- codex-imap-claim-repair-2026-07-28 --> ## Failure An upgraded PostgreSQL database can be stamped at Campaign head while `imap_append_attempts.claim_token` is absent. Campaign workspace/report loading then fails with `psycopg.errors.UndefinedColumn`. ## Repair - Add an idempotent forward repair migration after `d8b3e2c1f4a5`. - Preserve the column on downgrade because it belongs to the earlier claim migration. - Cover missing-column and repeated-upgrade behavior. - Verify the reported campaign/version workspace summary against PostgreSQL. Implemented and verified locally; close after push.
zemion added the
type
bug
module/campaignarea/db
status
in-progress
priority
p1
labels 2026-07-29 00:19:23 +02:00
zemion added the codex/ready label 2026-07-29 14:15:01 +02:00
Author
Owner

Codex State: done

The idempotent forward repair is published on main at 5240749. It adds the missing imap_append_attempts.claim_token column for upgraded databases, tolerates repeated upgrade execution, preserves the earlier claim schema on downgrade, and includes release/dev migration parity. Campaign and consolidated migration checks pass. Closing as requested after push.

## Codex State: done The idempotent forward repair is published on `main` at `5240749`. It adds the missing `imap_append_attempts.claim_token` column for upgraded databases, tolerates repeated upgrade execution, preserves the earlier claim schema on downgrade, and includes release/dev migration parity. Campaign and consolidated migration checks pass. Closing as requested after push.
zemion removed the codex/ready
status
in-progress
labels 2026-07-29 14:23:45 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-campaign#82