Skip to content

Sellf updates: apply all pending migrations in one transaction - #46

Merged
jurczykpawel merged 6 commits into
mainfrom
fix/sellf-migrations-rebased
Nov 28, 2026
Merged

jurczykpawel merged 6 commits into
mainfrom
fix/sellf-migrations-rebased

Conversation

@jurczykpawel

Copy link
Copy Markdown
Owner

Migration runner for Sellf updates, used for every Sellf 2026.11.1 release-candidate update on the TEST server (rc.1–rc.6):

  • the migration directory is replaced on update; an ambiguous migration set stops before the database is touched
  • release migrations are checked before the legacy update stops the app; migration errors fail the deploy
  • all pending migrations are applied in one transaction; an unclear result is settled through a validated read of the migration registry
  • the database key travels through a private header file and the environment, never process arguments

Rebased onto current main (one conflict in local/deploy.sh: both the shared WordPress Redis helper and the migration check are cleaned up).

Test plan

  • ./tests/run.sh: 467 passed, 0 failed
  • Real update on the Sellf TEST server with this exact commit (e7db267), 11.0 → 2026.11.1-rc.6: exit 0, ~30 s downtime, release migration applied in a single transaction (1 applied, 71 already applied, 0 errors)
  • CI green

🤖 Generated with Claude Code

jurczykpawel and others added 6 commits November 28, 2026 17:23
… the database on an ambiguous migration set

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he app, validate the status list, fail deploy on migration errors

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The migration runner sends every pending release migration in a single
apply_migration call. A failing file rolls back every file and registry row
and the error names the file. Timestamp-only registry entries count as
applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A lost, garbled or gateway answer can follow a COMMIT. Such a result is now
checked against the migration registry: all versions present counts as
applied, none (read twice) as rolled back, anything else exits 4 with an
'unknown' message instead of claiming nothing was applied.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…egistry read

Any answer to a request that reached the database API, an error included,
is now checked against the migration registry. Only a list of entries with
timestamped versions counts as a reading; anything else reports the result
as unknown (exit 4). A request that could not be sent still fails at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e header file and the environment, not process arguments

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jurczykpawel
jurczykpawel merged commit 3f58941 into main Nov 28, 2026
2 checks passed
@jurczykpawel
jurczykpawel deleted the fix/sellf-migrations-rebased branch November 28, 2026 19:13
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