Skip to content

fix(queue): ensure claim columns when Phinx did not run - #122

Merged
Ibochkarev merged 1 commit into
masterfrom
fix/queue-claim-schema-ensure
Jul 30, 2026
Merged

fix(queue): ensure claim columns when Phinx did not run#122
Ibochkarev merged 1 commit into
masterfrom
fix/queue-claim-schema-ensure

Conversation

@Ibochkarev

Copy link
Copy Markdown
Member

Production upgrades that deliver Sendex 2.0 maps without a successful Phinx run (20260725190000_add_queue_claim_fields) fail with Unknown column 'sxQueue.claimed_at' in 'field list'.

Sendex now ensures claimed_at, attempts, and expires_at once per process after addPackage, using $xpdo->prepare (MODX 2/3). Concurrent ALTERs that hit duplicate-column are treated as success when the columns are already present.

Verified locally: drop columns → ensure restores them → getCount('sxQueue') works. PHPUnit 277 green, PHPCS green.

Sites that got Sendex 2.0 maps without a successful #105 migration fail
xPDO SELECTs on sxQueue.claimed_at. Ensure claimed_at/attempts/expires_at
on Sendex bootstrap so mgr and cron work before a full package remigrate.
@Ibochkarev
Ibochkarev merged commit 72837c7 into master Jul 30, 2026
10 checks passed
@Ibochkarev
Ibochkarev deleted the fix/queue-claim-schema-ensure branch July 30, 2026 08:58
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