MigrationBuilder.AlterSequence 方法

定义

重载

AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)
AlterSequence(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

生成 以 AlterSequenceOperation 更改现有序列。

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
minValue
Nullable<Int64>
maxValue
Nullable<Int64>
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。

minValue
Nullable<Int64>

序列的最小值,如果未指定, null 则为 。

maxValue
Nullable<Int64>

序列的最大值,如果未指定, null 则为 。

cyclic
Boolean

指示在达到最大值时序列是否会重新启动。

oldIncrementBy
Int32

在序列中生成下一个值时要递增的上一个量,默认值为 1。

oldMinValue
Nullable<Int64>

序列的上一个最小值,如果未指定, null 则为 。

oldMaxValue
Nullable<Int64>

序列的上一个最大值,如果未指定, null 则为 。

oldCyclic
Boolean

指示在达到最大值时序列是否以前重新启动。

返回

允许将批注添加到操作的生成器。

注解

有关详细信息和示例 ,请参阅数据库迁移

适用于