MigrationBuilder MigrationBuilder Class

Syntax

Declaration

public class MigrationBuilderPublic Class MigrationBuilder

Inheritance Hierarchy

  • System.Object
    System.Object
  • MigrationBuilder
    MigrationBuilder

Inherited Members

ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Properties summary

Methods summary

Constructors

  • MigrationBuilder(String)
    MigrationBuilder(String)
    public MigrationBuilder(string activeProvider)Public Sub New(activeProvider As String)

    Parameters

    • activeProvider
      System.String
      System.String

Properties

  • ActiveProvider
    ActiveProvider
    public virtual string ActiveProvider { get; }Public Overridable ReadOnly Property ActiveProvider As String

    Property Value

    • System.String
      System.String
  • Operations
    Operations
    public virtual List<MigrationOperation> Operations { get; }Public Overridable ReadOnly Property Operations As List(Of MigrationOperation)

    Property Value

Methods

  • AddColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String)
    AddColumn(Of T)(String, String, String, Nullable(Of Boolean), Nullable(Of Int32), Boolean, String, Boolean, Object, String, String)
    public virtual OperationBuilder<AddColumnOperation> AddColumn<T>(string name, string table, string type = null, bool ? unicode = null, int ? maxLength = null, bool rowVersion = false, string schema = null, bool nullable = false, object defaultValue = null, string defaultValueSql = null, string computedColumnSql = null)Public Overridable Function AddColumn(Of T)(name As String, table As String, type As String = Nothing, unicode As Boolean? = Nothing, maxLength As Integer? = Nothing, rowVersion As Boolean = False, schema As String = Nothing, nullable As Boolean = False, defaultValue As Object = Nothing, defaultValueSql As String = Nothing, computedColumnSql As String = Nothing) As OperationBuilder(Of AddColumnOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • type
      System.String
      System.String
    • unicode
      System.Nullable<T><System.Boolean>
      System.Nullable<T>(Of System.Boolean)
    • maxLength
      System.Nullable<T><System.Int32>
      System.Nullable<T>(Of System.Int32)
    • rowVersion
      System.Boolean
      System.Boolean
    • schema
      System.String
      System.String
    • nullable
      System.Boolean
      System.Boolean
    • defaultValue
      System.Object
      System.Object
    • defaultValueSql
      System.String
      System.String
    • computedColumnSql
      System.String
      System.String

    Returns

  • AddForeignKey(String, String, String, String, String, String, String, ReferentialAction, ReferentialAction)
    AddForeignKey(String, String, String, String, String, String, String, ReferentialAction, ReferentialAction)
    public virtual OperationBuilder<AddForeignKeyOperation> AddForeignKey(string name, string table, string column, string principalTable, string schema = null, string principalSchema = null, string principalColumn = null, ReferentialAction onUpdate = ReferentialAction.NoAction, ReferentialAction onDelete = ReferentialAction.NoAction)Public Overridable Function AddForeignKey(name As String, table As String, column As String, principalTable As String, schema As String = Nothing, principalSchema As String = Nothing, principalColumn As String = Nothing, onUpdate As ReferentialAction = ReferentialAction.NoAction, onDelete As ReferentialAction = ReferentialAction.NoAction) As OperationBuilder(Of AddForeignKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • column
      System.String
      System.String
    • principalTable
      System.String
      System.String
    • schema
      System.String
      System.String
    • principalSchema
      System.String
      System.String
    • principalColumn
      System.String
      System.String
    • onUpdate
    • onDelete

    Returns

  • AddForeignKey(String, String, String[], String, String, String, String[], ReferentialAction, ReferentialAction)
    AddForeignKey(String, String, String(), String, String, String, String(), ReferentialAction, ReferentialAction)
    public virtual OperationBuilder<AddForeignKeyOperation> AddForeignKey(string name, string table, string[] columns, string principalTable, string schema = null, string principalSchema = null, string[] principalColumns = null, ReferentialAction onUpdate = ReferentialAction.NoAction, ReferentialAction onDelete = ReferentialAction.NoAction)Public Overridable Function AddForeignKey(name As String, table As String, columns As String(), principalTable As String, schema As String = Nothing, principalSchema As String = Nothing, principalColumns As String() = Nothing, onUpdate As ReferentialAction = ReferentialAction.NoAction, onDelete As ReferentialAction = ReferentialAction.NoAction) As OperationBuilder(Of AddForeignKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • columns
      System.String[]
      System.String()
    • principalTable
      System.String
      System.String
    • schema
      System.String
      System.String
    • principalSchema
      System.String
      System.String
    • principalColumns
      System.String[]
      System.String()
    • onUpdate
    • onDelete

    Returns

  • AddPrimaryKey(String, String, String, String)
    AddPrimaryKey(String, String, String, String)
    public virtual OperationBuilder<AddPrimaryKeyOperation> AddPrimaryKey(string name, string table, string column, string schema = null)Public Overridable Function AddPrimaryKey(name As String, table As String, column As String, schema As String = Nothing) As OperationBuilder(Of AddPrimaryKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • column
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • AddPrimaryKey(String, String, String[], String)
    AddPrimaryKey(String, String, String(), String)
    public virtual OperationBuilder<AddPrimaryKeyOperation> AddPrimaryKey(string name, string table, string[] columns, string schema = null)Public Overridable Function AddPrimaryKey(name As String, table As String, columns As String(), schema As String = Nothing) As OperationBuilder(Of AddPrimaryKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • columns
      System.String[]
      System.String()
    • schema
      System.String
      System.String

    Returns

  • AddUniqueConstraint(String, String, String, String)
    AddUniqueConstraint(String, String, String, String)
    public virtual OperationBuilder<AddUniqueConstraintOperation> AddUniqueConstraint(string name, string table, string column, string schema = null)Public Overridable Function AddUniqueConstraint(name As String, table As String, column As String, schema As String = Nothing) As OperationBuilder(Of AddUniqueConstraintOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • column
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • AddUniqueConstraint(String, String, String[], String)
    AddUniqueConstraint(String, String, String(), String)
    public virtual OperationBuilder<AddUniqueConstraintOperation> AddUniqueConstraint(string name, string table, string[] columns, string schema = null)Public Overridable Function AddUniqueConstraint(name As String, table As String, columns As String(), schema As String = Nothing) As OperationBuilder(Of AddUniqueConstraintOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • columns
      System.String[]
      System.String()
    • schema
      System.String
      System.String

    Returns

  • AlterColumn<T>(String, String, String, Nullable<Boolean>, Nullable<Int32>, Boolean, String, Boolean, Object, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String)
    AlterColumn(Of T)(String, String, String, Nullable(Of Boolean), Nullable(Of Int32), Boolean, String, Boolean, Object, String, String, Type, String, Nullable(Of Boolean), Nullable(Of Int32), Boolean, Boolean, Object, String, String)
    public virtual AlterOperationBuilder<AlterColumnOperation> AlterColumn<T>(string name, string table, string type = null, bool ? unicode = null, int ? maxLength = null, bool rowVersion = false, string schema = null, bool nullable = false, object defaultValue = null, string defaultValueSql = null, string computedColumnSql = null, Type oldClrType = null, string oldType = null, bool ? oldUnicode = null, int ? oldMaxLength = null, bool oldRowVersion = false, bool oldNullable = false, object oldDefaultValue = null, string oldDefaultValueSql = null, string oldComputedColumnSql = null)Public Overridable Function AlterColumn(Of T)(name As String, table As String, type As String = Nothing, unicode As Boolean? = Nothing, maxLength As Integer? = Nothing, rowVersion As Boolean = False, schema As String = Nothing, nullable As Boolean = False, defaultValue As Object = Nothing, defaultValueSql As String = Nothing, computedColumnSql As String = Nothing, oldClrType As Type = Nothing, oldType As String = Nothing, oldUnicode As Boolean? = Nothing, oldMaxLength As Integer? = Nothing, oldRowVersion As Boolean = False, oldNullable As Boolean = False, oldDefaultValue As Object = Nothing, oldDefaultValueSql As String = Nothing, oldComputedColumnSql As String = Nothing) As AlterOperationBuilder(Of AlterColumnOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • type
      System.String
      System.String
    • unicode
      System.Nullable<T><System.Boolean>
      System.Nullable<T>(Of System.Boolean)
    • maxLength
      System.Nullable<T><System.Int32>
      System.Nullable<T>(Of System.Int32)
    • rowVersion
      System.Boolean
      System.Boolean
    • schema
      System.String
      System.String
    • nullable
      System.Boolean
      System.Boolean
    • defaultValue
      System.Object
      System.Object
    • defaultValueSql
      System.String
      System.String
    • computedColumnSql
      System.String
      System.String
    • oldClrType
      System.Type
      System.Type
    • oldType
      System.String
      System.String
    • oldUnicode
      System.Nullable<T><System.Boolean>
      System.Nullable<T>(Of System.Boolean)
    • oldMaxLength
      System.Nullable<T><System.Int32>
      System.Nullable<T>(Of System.Int32)
    • oldRowVersion
      System.Boolean
      System.Boolean
    • oldNullable
      System.Boolean
      System.Boolean
    • oldDefaultValue
      System.Object
      System.Object
    • oldDefaultValueSql
      System.String
      System.String
    • oldComputedColumnSql
      System.String
      System.String

    Returns

  • AlterDatabase()
    AlterDatabase()
    public virtual AlterOperationBuilder<AlterDatabaseOperation> AlterDatabase()Public Overridable Function AlterDatabase As AlterOperationBuilder(Of AlterDatabaseOperation)

    Returns

  • AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
    AlterSequence(String, String, Int32, Nullable(Of Int64), Nullable(Of Int64), Boolean, Int32, Nullable(Of Int64), Nullable(Of Int64), Boolean)
    public virtual AlterOperationBuilder<AlterSequenceOperation> AlterSequence(string name, string schema = null, int incrementBy = 1, long ? minValue = null, long ? maxValue = null, bool cyclic = false, int oldIncrementBy = 1, long ? oldMinValue = null, long ? oldMaxValue = null, bool oldCyclic = false)Public Overridable Function AlterSequence(name As String, schema As String = Nothing, incrementBy As Integer = 1, minValue As Long? = Nothing, maxValue As Long? = Nothing, cyclic As Boolean = False, oldIncrementBy As Integer = 1, oldMinValue As Long? = Nothing, oldMaxValue As Long? = Nothing, oldCyclic As Boolean = False) As AlterOperationBuilder(Of AlterSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String
    • incrementBy
      System.Int32
      System.Int32
    • minValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • maxValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • cyclic
      System.Boolean
      System.Boolean
    • oldIncrementBy
      System.Int32
      System.Int32
    • oldMinValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • oldMaxValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • oldCyclic
      System.Boolean
      System.Boolean

    Returns

  • AlterTable(String, String)
    AlterTable(String, String)
    public virtual AlterOperationBuilder<AlterTableOperation> AlterTable(string name, string schema = null)Public Overridable Function AlterTable(name As String, schema As String = Nothing) As AlterOperationBuilder(Of AlterTableOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • CreateIndex(String, String, String, String, Boolean)
    CreateIndex(String, String, String, String, Boolean)
    public virtual OperationBuilder<CreateIndexOperation> CreateIndex(string name, string table, string column, string schema = null, bool unique = false)Public Overridable Function CreateIndex(name As String, table As String, column As String, schema As String = Nothing, unique As Boolean = False) As OperationBuilder(Of CreateIndexOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • column
      System.String
      System.String
    • schema
      System.String
      System.String
    • unique
      System.Boolean
      System.Boolean

    Returns

  • CreateIndex(String, String, String[], String, Boolean)
    CreateIndex(String, String, String(), String, Boolean)
    public virtual OperationBuilder<CreateIndexOperation> CreateIndex(string name, string table, string[] columns, string schema = null, bool unique = false)Public Overridable Function CreateIndex(name As String, table As String, columns As String(), schema As String = Nothing, unique As Boolean = False) As OperationBuilder(Of CreateIndexOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • columns
      System.String[]
      System.String()
    • schema
      System.String
      System.String
    • unique
      System.Boolean
      System.Boolean

    Returns

  • CreateSequence(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
    CreateSequence(String, String, Int64, Int32, Nullable(Of Int64), Nullable(Of Int64), Boolean)
    public virtual OperationBuilder<CreateSequenceOperation> CreateSequence(string name, string schema = null, long startValue = 1L, int incrementBy = 1, long ? minValue = null, long ? maxValue = null, bool cyclic = false)Public Overridable Function CreateSequence(name As String, schema As String = Nothing, startValue As Long = 1L, incrementBy As Integer = 1, minValue As Long? = Nothing, maxValue As Long? = Nothing, cyclic As Boolean = False) As OperationBuilder(Of CreateSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String
    • startValue
      System.Int64
      System.Int64
    • incrementBy
      System.Int32
      System.Int32
    • minValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • maxValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • cyclic
      System.Boolean
      System.Boolean

    Returns

  • CreateSequence<T>(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
    CreateSequence(Of T)(String, String, Int64, Int32, Nullable(Of Int64), Nullable(Of Int64), Boolean)
    public virtual OperationBuilder<CreateSequenceOperation> CreateSequence<T>(string name, string schema = null, long startValue = 1L, int incrementBy = 1, long ? minValue = null, long ? maxValue = null, bool cyclic = false)Public Overridable Function CreateSequence(Of T)(name As String, schema As String = Nothing, startValue As Long = 1L, incrementBy As Integer = 1, minValue As Long? = Nothing, maxValue As Long? = Nothing, cyclic As Boolean = False) As OperationBuilder(Of CreateSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String
    • startValue
      System.Int64
      System.Int64
    • incrementBy
      System.Int32
      System.Int32
    • minValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • maxValue
      System.Nullable<T><System.Int64>
      System.Nullable<T>(Of System.Int64)
    • cyclic
      System.Boolean
      System.Boolean

    Returns

  • CreateTable<TColumns>(String, Func<ColumnsBuilder, TColumns>, String, Action<CreateTableBuilder<TColumns>>)
    CreateTable(Of TColumns)(String, Func(Of ColumnsBuilder, TColumns), String, Action(Of CreateTableBuilder(Of TColumns)))
    public virtual CreateTableBuilder<TColumns> CreateTable<TColumns>(string name, Func<ColumnsBuilder, TColumns> columns, string schema = null, Action<CreateTableBuilder<TColumns>> constraints = null)Public Overridable Function CreateTable(Of TColumns)(name As String, columns As Func(Of ColumnsBuilder, TColumns), schema As String = Nothing, constraints As Action(Of CreateTableBuilder(Of TColumns)) = Nothing) As CreateTableBuilder(Of TColumns)

    Parameters

    Returns

  • DropColumn(String, String, String)
    DropColumn(String, String, String)
    public virtual OperationBuilder<DropColumnOperation> DropColumn(string name, string table, string schema = null)Public Overridable Function DropColumn(name As String, table As String, schema As String = Nothing) As OperationBuilder(Of DropColumnOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropForeignKey(String, String, String)
    DropForeignKey(String, String, String)
    public virtual OperationBuilder<DropForeignKeyOperation> DropForeignKey(string name, string table, string schema = null)Public Overridable Function DropForeignKey(name As String, table As String, schema As String = Nothing) As OperationBuilder(Of DropForeignKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropIndex(String, String, String)
    DropIndex(String, String, String)
    public virtual OperationBuilder<DropIndexOperation> DropIndex(string name, string table = null, string schema = null)Public Overridable Function DropIndex(name As String, table As String = Nothing, schema As String = Nothing) As OperationBuilder(Of DropIndexOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropPrimaryKey(String, String, String)
    DropPrimaryKey(String, String, String)
    public virtual OperationBuilder<DropPrimaryKeyOperation> DropPrimaryKey(string name, string table, string schema = null)Public Overridable Function DropPrimaryKey(name As String, table As String, schema As String = Nothing) As OperationBuilder(Of DropPrimaryKeyOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropSchema(String)
    DropSchema(String)
    public virtual OperationBuilder<DropSchemaOperation> DropSchema(string name)Public Overridable Function DropSchema(name As String) As OperationBuilder(Of DropSchemaOperation)

    Parameters

    • name
      System.String
      System.String

    Returns

  • DropSequence(String, String)
    DropSequence(String, String)
    public virtual OperationBuilder<DropSequenceOperation> DropSequence(string name, string schema = null)Public Overridable Function DropSequence(name As String, schema As String = Nothing) As OperationBuilder(Of DropSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropTable(String, String)
    DropTable(String, String)
    public virtual OperationBuilder<DropTableOperation> DropTable(string name, string schema = null)Public Overridable Function DropTable(name As String, schema As String = Nothing) As OperationBuilder(Of DropTableOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • DropUniqueConstraint(String, String, String)
    DropUniqueConstraint(String, String, String)
    public virtual OperationBuilder<DropUniqueConstraintOperation> DropUniqueConstraint(string name, string table, string schema = null)Public Overridable Function DropUniqueConstraint(name As String, table As String, schema As String = Nothing) As OperationBuilder(Of DropUniqueConstraintOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • EnsureSchema(String)
    EnsureSchema(String)
    public virtual OperationBuilder<EnsureSchemaOperation> EnsureSchema(string name)Public Overridable Function EnsureSchema(name As String) As OperationBuilder(Of EnsureSchemaOperation)

    Parameters

    • name
      System.String
      System.String

    Returns

  • RenameColumn(String, String, String, String)
    RenameColumn(String, String, String, String)
    public virtual OperationBuilder<RenameColumnOperation> RenameColumn(string name, string table, string newName, string schema = null)Public Overridable Function RenameColumn(name As String, table As String, newName As String, schema As String = Nothing) As OperationBuilder(Of RenameColumnOperation)

    Parameters

    • name
      System.String
      System.String
    • table
      System.String
      System.String
    • newName
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • RenameIndex(String, String, String, String)
    RenameIndex(String, String, String, String)
    public virtual OperationBuilder<RenameIndexOperation> RenameIndex(string name, string newName, string table = null, string schema = null)Public Overridable Function RenameIndex(name As String, newName As String, table As String = Nothing, schema As String = Nothing) As OperationBuilder(Of RenameIndexOperation)

    Parameters

    • name
      System.String
      System.String
    • newName
      System.String
      System.String
    • table
      System.String
      System.String
    • schema
      System.String
      System.String

    Returns

  • RenameSequence(String, String, String, String)
    RenameSequence(String, String, String, String)
    public virtual OperationBuilder<RenameSequenceOperation> RenameSequence(string name, string schema = null, string newName = null, string newSchema = null)Public Overridable Function RenameSequence(name As String, schema As String = Nothing, newName As String = Nothing, newSchema As String = Nothing) As OperationBuilder(Of RenameSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String
    • newName
      System.String
      System.String
    • newSchema
      System.String
      System.String

    Returns

  • RenameTable(String, String, String, String)
    RenameTable(String, String, String, String)
    public virtual OperationBuilder<RenameTableOperation> RenameTable(string name, string schema = null, string newName = null, string newSchema = null)Public Overridable Function RenameTable(name As String, schema As String = Nothing, newName As String = Nothing, newSchema As String = Nothing) As OperationBuilder(Of RenameTableOperation)

    Parameters

    • name
      System.String
      System.String
    • schema
      System.String
      System.String
    • newName
      System.String
      System.String
    • newSchema
      System.String
      System.String

    Returns

  • RestartSequence(String, Int64, String)
    RestartSequence(String, Int64, String)
    public virtual OperationBuilder<RestartSequenceOperation> RestartSequence(string name, long startValue = 1L, string schema = null)Public Overridable Function RestartSequence(name As String, startValue As Long = 1L, schema As String = Nothing) As OperationBuilder(Of RestartSequenceOperation)

    Parameters

    • name
      System.String
      System.String
    • startValue
      System.Int64
      System.Int64
    • schema
      System.String
      System.String

    Returns

  • Sql(String, Boolean)
    Sql(String, Boolean)
    public virtual OperationBuilder<SqlOperation> Sql(string sql, bool suppressTransaction = false)Public Overridable Function Sql(sql As String, suppressTransaction As Boolean = False) As OperationBuilder(Of SqlOperation)

    Parameters

    • sql
      System.String
      System.String
    • suppressTransaction
      System.Boolean
      System.Boolean

    Returns

Details

Assembly

Microsoft.EntityFrameworkCore.Relational.dll