Migrator Migrator Class

Definition

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public class Migrator : IMigrator
Public Class Migrator
    Implements IMigrator
Inheritance
System.ObjectSystem.Object
MigratorMigrator
Implements

Constructors

Migrator(IMigrationsAssembly, IHistoryRepository, IDatabaseCreator, IMigrationsSqlGenerator, IRawSqlCommandBuilder, IMigrationCommandExecutor, IRelationalConnection, ISqlGenerationHelper, ILogger, IDatabaseProviderServices) Migrator(IMigrationsAssembly, IHistoryRepository, IDatabaseCreator, IMigrationsSqlGenerator, IRawSqlCommandBuilder, IMigrationCommandExecutor, IRelationalConnection, ISqlGenerationHelper, ILogger(Of Migrator), IDatabaseProviderServices)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public Migrator(IMigrationsAssembly migrationsAssembly, IHistoryRepository historyRepository, IDatabaseCreator databaseCreator, IMigrationsSqlGenerator migrationsSqlGenerator, IRawSqlCommandBuilder rawSqlCommandBuilder, IMigrationCommandExecutor migrationCommandExecutor, IRelationalConnection connection, ISqlGenerationHelper sqlGenerationHelper, ILogger<Migrator> logger, IDatabaseProviderServices providerServices)
Public Sub New(migrationsAssembly As IMigrationsAssembly, historyRepository As IHistoryRepository, databaseCreator As IDatabaseCreator, migrationsSqlGenerator As IMigrationsSqlGenerator, rawSqlCommandBuilder As IRawSqlCommandBuilder, migrationCommandExecutor As IMigrationCommandExecutor, connection As IRelationalConnection, sqlGenerationHelper As ISqlGenerationHelper, logger As ILogger(Of Migrator), providerServices As IDatabaseProviderServices)
Parameters
logger
ILogger<Migrator> ILogger(Of Migrator)

Methods

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

GenerateDownSql(Migration, Migration) GenerateDownSql(Migration, Migration)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual IReadOnlyList<MigrationCommand> GenerateDownSql(Migration migration, Migration previousMigration)
Protected Overridable Function GenerateDownSql(migration As Migration, previousMigration As Migration) As IReadOnlyList(Of MigrationCommand)
Parameters
migration
Migration Migration
previousMigration
Migration Migration
Returns
System.Collections.Generic.IReadOnlyList<MigrationCommand> System.Collections.Generic.IReadOnlyList(Of MigrationCommand)

GenerateScript(String, String, Boolean) GenerateScript(String, String, Boolean)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual string GenerateScript(string fromMigration = null, string toMigration = null, bool idempotent = false)
Public Overridable Function GenerateScript(fromMigration As String = Nothing, toMigration As String = Nothing, idempotent As Boolean = False) As String
Parameters
fromMigration
System.String System.String
toMigration
System.String System.String
idempotent
System.Boolean System.Boolean
Returns
System.String System.String

GenerateUpSql(Migration) GenerateUpSql(Migration)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

protected virtual IReadOnlyList<MigrationCommand> GenerateUpSql(Migration migration)
Protected Overridable Function GenerateUpSql(migration As Migration) As IReadOnlyList(Of MigrationCommand)
Parameters
migration
Migration Migration
Returns
System.Collections.Generic.IReadOnlyList<MigrationCommand> System.Collections.Generic.IReadOnlyList(Of MigrationCommand)

GetHashCode() GetHashCode()

Inherited from System.Object

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

Migrate(String) Migrate(String)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual void Migrate(string targetMigration = null)
Public Overridable Sub Migrate(targetMigration As String = Nothing)
Parameters
targetMigration
System.String System.String

MigrateAsync(String, CancellationToken) MigrateAsync(String, CancellationToken)

This API supports the Entity Framework Core infrastructure and is not intended to be used directly from your code. This API may change or be removed in future releases.

public virtual Task MigrateAsync(string targetMigration = null, CancellationToken cancellationToken = null)
Public Overridable Function MigrateAsync(targetMigration As String = Nothing, cancellationToken As CancellationToken = Nothing) As Task
Parameters
targetMigration
System.String System.String
cancellationToken
System.Threading.CancellationToken System.Threading.CancellationToken
Returns
System.Threading.Tasks.Task System.Threading.Tasks.Task

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ToString() ToString()

Inherited from System.Object