Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expmigrationdryrun

Dry run of the pending migrations: the plan, and with --simulate a run in a transaction that is rolled back (--diff shows what changed).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expmigrationdryrun.md

On this page

exp:expmigrationdryrun

Dry run of the pending migrations: the plan, and with --simulate a run in a transaction that is rolled back (--diff shows what changed).

Script bin/php/expmigrationdryrun.php, code in kernel/private/classes/commands/expmigrationdryrun.php. Run it from the installation root, as the user the web server runs as:

./console exp:expmigrationdryrun --help
./console exp:migration:dry-run --help
php bin/php/expmigrationdryrun.php --help

Help text

Dry run of the pending migrations
exp:migration:migrate without --apply: every pending migration with what it would change, the
checksum guard and the check of the code trees, nothing written. --simulate runs the migrations with
up() in one transaction that is rolled back at the end, under the installation lock, where the
database undoes schema changes too (PostgreSQL, SQLite; elsewhere the plan is listed with a warning).
--diff adds what each migration changed: tables and columns added or dropped, rows per table. Files,
caches and the search index a migration writes are not undone by the rollback.

./console exp:migration:dry-run
./console exp:migration:dry-run --simulate --diff
./console exp:migration:dry-run --only=20261031120000_add_news_class --format=json

Options

OptionValueHelp
--onlyrequiredOnly these migrations (migration ids, a comma list or repeated)
--pathrequiredMigration files or folders, relative to the root or absolute (a comma list or repeated): migrate and dry-run take only the migrations in them, check checks them instead of the migration directories
--environmentrequiredThe environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count
--formatrequiredtext (default) or json (the machine output exp-migration/1)
--loginrequiredRun as this user (default: [RunSettings] RunAsUser of migration.ini)
--diffWith --simulate: what each migration changed in the database (tables, columns, rows)
--simulateRun the migrations in a transaction that is rolled back (PostgreSQL and SQLite; elsewhere the plan is listed)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expmigrationdryrun.php, kernel/private/classes/commands/expmigrationdryrun.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x