Share via


MigrationBuilder.CreateSequence Method

Definition

Overloads

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

Builds a CreateSequenceOperation to create a new sequence.

CreateSequence<T>(String, String, Int64, Int32, Nullable<Int64>, Nullable<Int64>, Boolean)

Builds a CreateSequenceOperation to create a new sequence.

CreateSequence(String, String, Int64, 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

Builds a CreateSequenceOperation to create a new sequence.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence (string name, string schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence (string name, string? schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
abstract member CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
override this.CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
Public Overridable Function CreateSequence (name As String, Optional schema As String = Nothing, Optional startValue As Long = 1, 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 CreateSequenceOperation)

Parameters

name
String

The sequence name.

schema
String

The schema that contains the sequence, or null to use the default schema.

startValue
Int64

The value at which the sequence will start, defaulting to 1.

incrementBy
Int32

The amount to increment by when generating the next value in the sequence, defaulting to 1.

minValue
Nullable<Int64>

The minimum value of the sequence, or null if not specified.

maxValue
Nullable<Int64>

The maximum value of the sequence, or null if not specified.

cyclic
Boolean

Indicates whether or not the sequence will re-start when the maximum value is reached.

Returns

A builder to allow annotations to be added to the operation.

Remarks

See Database migrations for more information and examples.

Applies to

CreateSequence<T>(String, String, Int64, 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

Builds a CreateSequenceOperation to create a new sequence.

public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence<T> (string name, string schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
public virtual Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation> CreateSequence<T> (string name, string? schema = default, long startValue = 1, int incrementBy = 1, long? minValue = default, long? maxValue = default, bool cyclic = false);
abstract member CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
override this.CreateSequence : string * string * int64 * int * Nullable<int64> * Nullable<int64> * bool -> Microsoft.EntityFrameworkCore.Migrations.Operations.Builders.OperationBuilder<Microsoft.EntityFrameworkCore.Migrations.Operations.CreateSequenceOperation>
Public Overridable Function CreateSequence(Of T) (name As String, Optional schema As String = Nothing, Optional startValue As Long = 1, 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 CreateSequenceOperation)

Type Parameters

T

The CLR type of the values generated by the sequence.

Parameters

name
String

The sequence name.

schema
String

The schema that contains the sequence, or null to use the default schema.

startValue
Int64

The value at which the sequence will start, defaulting to 1.

incrementBy
Int32

The amount to increment by when generating the next value in the sequence, defaulting to 1.

minValue
Nullable<Int64>

The minimum value of the sequence, or null if not specified.

maxValue
Nullable<Int64>

The maximum value of the sequence, or null if not specified.

cyclic
Boolean

Indicates whether or not the sequence will re-start when the maximum value is reached.

Returns

A builder to allow annotations to be added to the operation.

Remarks

See Database migrations for more information and examples.

Applies to