MigrationBuilder.AlterSequence 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation> AlterSequence (string name, string schema = default, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
abstract member AlterSequence : string * string * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation>
override this.AlterSequence : string * string * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation>
Public Overridable Function AlterSequence (name As String, Optional schema As String = Nothing, Optional incrementBy As Integer = 1, Optional minValue As Nullable(Of Long) = Nothing, Optional maxValue As Nullable(Of Long) = Nothing, Optional cyclic As Boolean = false) As OperationBuilder(Of AlterSequenceOperation)
参数
- name
- String
- schema
- String
- incrementBy
- Int32
- cyclic
- Boolean
返回
适用于
AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
- Source:
- MigrationBuilder.cs
生成 以 AlterSequenceOperation 更改现有序列。
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation> AlterSequence (string name, string schema = default, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false, int oldIncrementBy = 1, long? oldMinValue = default, long? oldMaxValue = default, bool oldCyclic = false);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation> AlterSequence (string name, string? schema = default, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false, int oldIncrementBy = 1, long? oldMinValue = default, long? oldMaxValue = default, bool oldCyclic = false);
abstract member AlterSequence : string * string * int * Nullable<int64> * Nullable<int64> * bool * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation>
override this.AlterSequence : string * string * int * Nullable<int64> * Nullable<int64> * bool * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.AlterOperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.AlterSequenceOperation>
Public Overridable Function AlterSequence (name As String, Optional schema As String = Nothing, Optional incrementBy As Integer = 1, Optional minValue As Nullable(Of Long) = Nothing, Optional maxValue As Nullable(Of Long) = Nothing, Optional cyclic As Boolean = false, Optional oldIncrementBy As Integer = 1, Optional oldMinValue As Nullable(Of Long) = Nothing, Optional oldMaxValue As Nullable(Of Long) = Nothing, Optional oldCyclic As Boolean = false) As AlterOperationBuilder(Of AlterSequenceOperation)
参数
- name
- String
序列名称。
- schema
- String
包含序列的架构,或使用 null
默认架构。
- incrementBy
- Int32
在序列中生成下一个值时要递增的量,默认值为 1。
- cyclic
- Boolean
指示在达到最大值时序列是否会重新启动。
- oldIncrementBy
- Int32
在序列中生成下一个值时要递增的上一个量,默认值为 1。
- oldCyclic
- Boolean
指示在达到最大值时序列是否以前重新启动。
返回
允许将批注添加到操作的生成器。
注解
有关详细信息和示例 ,请参阅数据库迁移 。