Class MigrationOptions
Defines the migration options.
[ExcludeFromCodeCoverage(Justification = "Plain old C# object. Dumb class with no behaviors.")]
public record MigrationOptions : IEquatable<MigrationOptions>
- Inheritance
-
MigrationOptions
- Implements
- Inherited Members
Constructors
MigrationOptions(bool, bool, bool, bool)
Initializes a new instance of the MigrationOptions class.
public MigrationOptions(bool allowDataLoss = false, bool updateExistingDatabase = true, bool force = false, bool dryRun = false)
Parameters
allowDataLossbooltrueto allow data loss; otherwise,false.updateExistingDatabaseboolWhen set to
trueexisting database will be migrated. Otherwise,falseexisting database will not be migrated. If database does not exists, then it will be created even if set tofalse.forcebooltrueto force migration even if the schema version has not changed; otherwise,false.dryRunbooltrueto execute a dry run of the migration; otherwise,false.
Properties
AllowDataLoss
Gets a value indicating whether the migration allows data loss.
public bool AllowDataLoss { get; init; }
Property Value
DryRun
Gets a value indicating whether the migration was a dry run.
public bool DryRun { get; init; }
Property Value
Force
Gets a value indicating whether the migration will be forced.
public bool Force { get; init; }
Property Value
UpdateDatabase
Gets a value indicating whether the migration updates the database.
[Obsolete("Use the UpdateExistingDatabase property instead.", UrlFormat = "https://documentation.neos.groupeisagri.com/api/GroupeIsa.Neos.Migration.MigrationOptions.html")]
public bool UpdateDatabase { get; init; }
Property Value
- bool
When set to
truedatabase will be migrated. Otherwise,falsedatabase will not be migrated. If database does not exists, then it will be created even if set tofalse.
UpdateExistingDatabase
Gets a value indicating whether the migration updates the existing database.
public bool UpdateExistingDatabase { get; init; }
Property Value
- bool
When set to
trueexisting database will be migrated. Otherwise,falseexisting database will not be migrated. If database does not exists, then it will be created even if set tofalse.