exp:expmigrationdryrun
Available since Exponential 6.0.15 (in development, not in a release yet).
Summary
Dry run of the pending migrations: the plan, and with --simulate a run in a transaction that is rolled back (--diff shows what changed)
Usage
./console exp:expmigrationdryrun [options] php bin/php/expmigrationdryrun.php [options] ./console exp:migration:dry-run [options]
Aliases
exp:migration:dry-run
Help
The output of ./console help exp:expmigrationdryrun (the script run with --help), without the standard options:
Usage: bin/php/expmigrationdryrun.php [OPTION]... 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: --only=VALUE... Only these migrations (migration ids, a comma list or repeated) --path=VALUE... Migration 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 --environment=VALUE The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count --format=VALUE text (default) or json (the machine output exp-migration/1) --login=VALUE Run as this user (default: [RunSettings] RunAsUser of migration.ini) --diff With --simulate: what each migration changed in the database (tables, columns, rows) --simulate Run the migrations in a transaction that is rolled back (PostgreSQL and SQLite; elsewhere the plan is listed)
Options
| Option | Value | Description |
|---|---|---|
| --only | required | Only these migrations (migration ids, a comma list or repeated) |
| --path | required | Migration 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 |
| --environment | required | The environment (default the installation's: [AdminEnvironment] Level, or EXP_ENV with Level=auto; check: every environment); only the migrations for it count |
| --format | required | text (default) or json (the machine output exp-migration/1) |
| --login | required | Run as this user (default: [RunSettings] RunAsUser of migration.ini) |
| --diff | - | With --simulate: what each migration changed in the database (tables, columns, rows) |
| --simulate | - | Run the migrations in a transaction that is rolled back (PostgreSQL and SQLite; elsewhere the plan is listed) |
Standard options
Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.
Source
bin/php/expmigrationdryrun.php, kernel/private/classes/commands/expmigrationdryrun.php
See also
Generated example: exp:expmigrationdryrun
Added to the reference for Exponential 6.0.15.
Contributors
- Graham Brookins Updated
Comments
Add a comment