Migration
A stored Entity transformation done to account for the domain model changes.
At its core the Migration
is a mapping of entity state, from old to new. It is also capable of performing basic entity modifications like archiving and deleting it.
The process of applying the migration operation is always preceded by an Entity load by ID and may be finalized by either saving the transformed entity back to the repository or by deleting the entity record if the migration is configured to do so.
All entity modifications are applied under the opened entity Transaction. The last step of a migration operation is a transaction commit. As a consequence, all entity lifecycle events occur as expected, having the MigrationApplied event as the producing message.
To create a user-defined Migration
in real life scenarios, consider inheriting from ProjectionMigration and ProcessManagerMigration types.
Parameters
the entity ID type
the entity type
the entity state type
Inheritors
Functions
true
if the entity under migration is archived.