fix(migrations): make all ways of running migrations consistent on update [WIP]#2386
Merged
Merged
Conversation
f68d430 to
de4911b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
1 — every path applies the same migrations
Idempotent (->change()), anonymous class.
migrate" option: installer-based installs/updates now pick up core-only migrations like 2026_04_12_..._create_system_cli_tasks_tables (the scheduler/worker tables the in-manager updater depends on), which they never created
before.
I deliberately did not copy create_system_cli_tasks_tables verbatim into install/stubs: I verified its ACL-baseline repair would fire against the empty permission tables during a fresh installer migrate and then collide with
seed('install')'s explicit-id inserts. Running it after seeding (healthy baseline → repair self-skips) avoids that. Confirmed safe re: class redeclaration — Migrator::run (vendor/.../Migrator.php:131) only requires pending
migrations, so the shared CreateFileGroupsTable class is never declared twice in one process.
2 — make:site update runs the update seeders
install/stubs/seeds/update/*), which the manager/CLI path previously skipped entirely.
Regression guard
and that the command applies the update seeders.
Test status
escapeshellarg quoting "..." vs '...'; one is Undefined constant EVO_BASE_PATH in updatePlaceholderFilePairs(), a method I didn't modify, invoked without the constant defined). These fail on the unmodified tree too.
TBD
e2e update test - sandboxed update with local zip fixtures. Deterministic, no network, exercises the real migrate + seed + Extras logic. Requires adding test seams to the command:
fits the style);
Flow: copy a minimal tree to a temp dir representing version N → install it against a temp SQLite DB → run the update with a N+1 zip fixture → assert. Fixtures only need the files the update touches (factory/version.php,
install/stubs/migrations + seeds/update, install/assets/modules/store.tpl, a couple of core files). Runs in seconds.