共用方式為


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)

來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
MigrationBuilder.cs
來源:
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

指出當達到最大值時,序列是否先前會重新開機。

傳回

建置器,允許將批註新增至作業。

備註

如需詳細資訊和範例 ,請參閱資料庫移 轉。

適用於