Files
xamxam/app/migrations
Pontoporeia 3ab03e2c7a fix(migrations): load composer autoloader so run.php works on a fresh DB
run.php never loaded vendor/autoload.php. SQL migrations were fine, but PHP
migrations run as isolated subprocesses that require src/ files directly, and
those files reference sibling classes (e.g. Database -> DatabaseMigrations)
resolvable only via composer's classmap. On a fresh schema.sql database the run
died at 013_fix_remarks_keywords.php with:

  Class "DatabaseMigrations" not found in app/src/Database.php:89

- run.php now resolves and requires the autoloader (vendor/ is a sibling dir in
  dev, same-dir in prod, matching app/bootstrap.php).
- Subprocess PHP migrations get it injected via -d auto_prepend_file so each
  migration's own contract is untouched ($argv[1] stays the DB path).

Verified: fresh schema.sql DB applies 47 migrations, exit 0; second run is a
no-op (0 applied).
2026-09-18 16:26:49 +02:00
..