Skip to content

fix(updater): make migration 801 idempotent for existing lockout columns - #1473

Merged
rumblefrog merged 1 commit into
mainfrom
fix/1472-updater-801-idempotent
May 26, 2026
Merged

rumblefrog merged 1 commit into
mainfrom
fix/1472-updater-801-idempotent

Conversation

@rumblefrog

Copy link
Copy Markdown
Member

Summary

  • Fixes Fatal error: Uncaught PDOException - running updater/ #1472 by changing web/updater/data/801.php to use ADD IF NOT EXISTS for the attempts and lockout_until columns on :prefix_admins, matching the idempotent pattern used by sibling migrations (112.php, 150.php, etc.).
  • Panels upgrading from v1.8.x (or re-running the updater after a partial pass) already carry these columns from struc.sql or a prior failed run; the bare ADD COLUMN shape fatals with SQLSTATE[42S21] Duplicate column name 'attempts'.
  • Adds Updater801LockoutColumnsTest covering full idempotent re-run and partial-failure recovery (only lockout_until missing).

Test plan

  • ./sbpp.sh test --filter=Updater801LockoutColumnsTest (2 tests, 8 assertions)
  • Manual: run /updater/ against a DB whose :prefix_admins already has attempts / lockout_until but config.version is still < 801

Panels upgrading from v1.8.x or re-running the updater after a partial pass
already carry `attempts` and `lockout_until` on `:prefix_admins`; the bare
ADD COLUMN shape fatals with SQLSTATE[42S21]. Use ADD IF NOT EXISTS to match
sibling migrations and add regression tests for full and partial re-runs.

Fixes #1472
@rumblefrog
rumblefrog added this pull request to the merge queue May 26, 2026
Merged via the queue into main with commit c10c40c May 26, 2026
5 checks passed
@rumblefrog
rumblefrog deleted the fix/1472-updater-801-idempotent branch May 26, 2026 20:07
@github-actions github-actions Bot locked and limited conversation to collaborators May 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fatal error: Uncaught PDOException - running updater/

1 participant