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

assert (migration step)

Fails the migration when a condition is false.

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/examples/migration-steps/assert.md

On this page

assert

Fails the migration when a condition is false.

A step of a YAML migration with type: assert. The class expMigrationStepAssert (kernel/classes/migration/steps/expmigrationstepassert.php) is registered in settings/migration.ini [StepSettings] StepTypeList[assert].

Keys

KeyTypeDefaultWhat it is
thatconditionrequiredthe condition that must be true (as an "if:")
messagestringthe message of the failure (default: the condition)

Besides these, every step takes the keys of the engine: type, mode, if, references, environments, engines and comment (the file format). A key of type identifier names a node, an object or another part of the installation by id, remote id, path or name (identifiers).

Undoing

Every step of this type undoes itself when its migration is rolled back without down:.

It touches no cache.

Example

- type: assert
  that: { ref: news_parent, set: true }
  message: The news folder is missing

Generated by ./console exp:help:examples from settings/migration.ini, kernel/classes/migration/steps/expmigrationstepassert.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