SqliteMigrationsSqlGenerator Class

Definition

SQLite-specific implementation of MigrationsSqlGenerator.

public class SqliteMigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator
type SqliteMigrationsSqlGenerator = class
    inherit MigrationsSqlGenerator
Public Class SqliteMigrationsSqlGenerator
Inherits MigrationsSqlGenerator
Inheritance
SqliteMigrationsSqlGenerator

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Database migrations, and Accessing SQLite databases with EF Core for more information and examples.

Constructors

SqliteMigrationsSqlGenerator(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IRelationalTypeMapper, IRelationalAnnotationProvider)
SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies, IMigrationsAnnotationProvider)

Creates a new SqliteMigrationsSqlGenerator instance.

SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies, IRelationalAnnotationProvider)

Creates a new SqliteMigrationsSqlGenerator instance.

SqliteMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies)

Properties

Annotations (Inherited from MigrationsSqlGenerator)
Dependencies

Relational provider-specific dependencies for this service.

(Inherited from MigrationsSqlGenerator)
Options

Gets or sets the options to use when generating commands.

(Inherited from MigrationsSqlGenerator)
SqlGenerationHelper (Inherited from MigrationsSqlGenerator)
SqlGenerator

The IUpdateSqlGenerator.

(Inherited from MigrationsSqlGenerator)
TypeMapper (Inherited from MigrationsSqlGenerator)
VersionComparer

Gets a comparer that can be used to compare two product versions.

(Inherited from MigrationsSqlGenerator)

Methods

CheckConstraint(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a check constraint of an AddCheckConstraintOperation.

(Inherited from MigrationsSqlGenerator)
CheckConstraint(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a check constraint of an CreateCheckConstraintOperation.

(Inherited from MigrationsSqlGenerator)
ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition in an AddColumnOperation.

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition in an AddColumnOperation.

(Inherited from MigrationsSqlGenerator)
ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

ColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

(Inherited from MigrationsSqlGenerator)
ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

(Inherited from MigrationsSqlGenerator)
ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

ColumnDefinition(String, String, String, Type, String, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, Boolean, Object, String, String, IAnnotatable, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a column definition for the given column metadata.

(Inherited from MigrationsSqlGenerator)
ColumnList(String[])

Concatenates the given column names into a DelimitIdentifier(String) separated list.

(Inherited from MigrationsSqlGenerator)
ComputedColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a computed column definition for the given column metadata.

ComputedColumnDefinition(String, String, String, ColumnOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a computed column definition for the given column metadata.

(Inherited from MigrationsSqlGenerator)
CreateTableCheckConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the check constraints of a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
CreateTableColumns(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the column definitions in a CreateTableOperation.

CreateTableColumns(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the column definitions in a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
CreateTableConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the constraints of a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
CreateTableForeignKeys(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the foreign key constraints of a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
CreateTablePrimaryKeyConstraint(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the primary key constraint of a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
CreateTableUniqueConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for the unique constraints of a CreateTableOperation.

(Inherited from MigrationsSqlGenerator)
DefaultValue(Object, String, MigrationCommandListBuilder)

Generates a SQL fragment for the default constraint of a column.

(Inherited from MigrationsSqlGenerator)
DefaultValue(Object, String, String, MigrationCommandListBuilder)

Generates a SQL fragment for the default constraint of a column.

(Inherited from MigrationsSqlGenerator)
EndStatement(MigrationCommandListBuilder, Boolean)

Generates a SQL fragment to terminate the SQL command.

(Inherited from MigrationsSqlGenerator)
FindEntityTypes(IModel, String, String)
Obsolete.

Finds all IEntityTypes that are mapped to the given table.

(Inherited from MigrationsSqlGenerator)
FindProperty(IModel, String, String, String)
Obsolete.

Finds some IProperty mapped to the given column.

If multiple properties map to the same column, then the property returned is one chosen arbitrarily. The model validator ensures that all properties mapped to a given column have consistent configuration.

(Inherited from MigrationsSqlGenerator)
ForeignKeyAction(ReferentialAction, MigrationCommandListBuilder)

Generates a SQL fragment for the given referential action.

(Inherited from MigrationsSqlGenerator)
ForeignKeyConstraint(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a foreign key constraint of an AddForeignKeyOperation.

(Inherited from MigrationsSqlGenerator)
Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given AddCheckConstraintOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given AddColumnOperation by making calls on the given MigrationCommandListBuilder.

Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given AddColumnOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(AddColumnOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given AddColumnOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given AddForeignKeyOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given AddForeignKeyOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given AddPrimaryKeyOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given AddPrimaryKeyOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AlterColumnOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given AlterDatabaseOperation by making calls on the given MigrationCommandListBuilder.

Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)

Can be overridden by database providers to build commands for the given AlterDatabaseOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since SQLite does not support sequences.

Generate(AlterTableOperation, IModel, MigrationCommandListBuilder)

Can be overridden by database providers to build commands for the given AlterTableOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given CreateCheckConstraintOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given CreateIndexOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given CreateIndexOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since SQLite does not support sequences.

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given CreateTableOperation by making calls on the given MigrationCommandListBuilder.

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given CreateTableOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given CreateTableOperation by making calls on the given MigrationCommandListBuilder.

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given CreateTableOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DeleteDataOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DeleteDataOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropCheckConstraintOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropCheckConstraintOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given DropColumnOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(DropColumnOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropColumnOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given DropForeignKeyOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropForeignKeyOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given DropIndexOperation by making calls on the given MigrationCommandListBuilder.

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

Can be overridden by database providers to build commands for the given DropIndexOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropIndexOperation by making calls on the given MigrationCommandListBuilder.

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)

Can be overridden by database providers to build commands for the given DropIndexOperation by making calls on the given MigrationCommandListBuilder.

Note that the default implementation of this method throws NotImplementedException. Providers must override if they are to support this kind of operation.

(Inherited from MigrationsSqlGenerator)
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given DropPrimaryKeyOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropPrimaryKeyOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropSchemaOperation, IModel, MigrationCommandListBuilder)

Ignored, since schemas are not supported by SQLite and are silently ignored to improve testing compatibility.

Generate(DropSequenceOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since SQLite does not support sequences.

Generate(DropTableOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given DropTableOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(DropTableOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given DropTableOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(DropUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since this operation requires table rebuilds, which are not yet supported.

Generate(EnsureSchemaOperation, IModel, MigrationCommandListBuilder)

Ignored, since schemas are not supported by SQLite and are silently ignored to improve testing compatibility.

Generate(InsertDataOperation, IModel, MigrationCommandListBuilder, Boolean)

Builds commands for the given InsertDataOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(InsertDataOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given InsertDataOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

Generates commands from a list of operations.

(Inherited from MigrationsSqlGenerator)
Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

Generate(IReadOnlyList<MigrationOperation>, IModel)

Generates commands from a list of operations.

(Inherited from MigrationsSqlGenerator)
Generate(MigrationOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given MigrationOperation by making calls on the given MigrationCommandListBuilder.

(Inherited from MigrationsSqlGenerator)
Generate(RenameColumnOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given RenameTableOperation by making calls on the given MigrationCommandListBuilder.

Generate(RenameIndexOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given RenameIndexOperation by making calls on the given MigrationCommandListBuilder.

Generate(RenameSequenceOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since SQLite does not support sequences.

Generate(RenameTableOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given RenameTableOperation by making calls on the given MigrationCommandListBuilder.

Generate(RestartSequenceOperation, IModel, MigrationCommandListBuilder)

Throws NotSupportedException since SQLite does not support sequences.

Generate(SqlOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given SqlOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
Generate(UpdateDataOperation, IModel, MigrationCommandListBuilder)

Builds commands for the given UpdateDataOperation by making calls on the given MigrationCommandListBuilder, and then terminates the final command.

(Inherited from MigrationsSqlGenerator)
GenerateIndexColumnList(CreateIndexOperation, IModel, MigrationCommandListBuilder)

Returns a SQL fragment for the column list of an index from a CreateIndexOperation.

(Inherited from MigrationsSqlGenerator)
GenerateModificationCommands(DeleteDataOperation, IModel)

Generates the commands that correspond to the given operation.

(Inherited from MigrationsSqlGenerator)
GenerateModificationCommands(InsertDataOperation, IModel)

Generates the commands that correspond to the given operation.

(Inherited from MigrationsSqlGenerator)
GenerateModificationCommands(UpdateDataOperation, IModel)

Generates the commands that correspond to the given operation.

(Inherited from MigrationsSqlGenerator)
GetColumnType(String, String, String, ColumnOperation, IModel)

Gets the store/database type of a column given the provided metadata.

(Inherited from MigrationsSqlGenerator)
GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

(Inherited from MigrationsSqlGenerator)
GetColumnType(String, String, String, Type, Nullable<Boolean>, Nullable<Int32>, Nullable<Boolean>, Boolean, IModel)

Gets the store/database type of a column given the provided metadata.

(Inherited from MigrationsSqlGenerator)
HasLegacyRenameOperations(IModel)

Checks whether or not RenameTableOperation and RenameSequenceOperation use the legacy behavior of setting the new name and schema to null when unchanged.

(Inherited from MigrationsSqlGenerator)
IndexOptions(CreateIndexOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for extras (filter, included columns, options) of an index from a CreateIndexOperation.

(Inherited from MigrationsSqlGenerator)
IndexTraits(MigrationOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for traits of an index from a CreateIndexOperation, AddPrimaryKeyOperation, or AddUniqueConstraintOperation.

(Inherited from MigrationsSqlGenerator)
IsOldColumnSupported(IModel)

Checks whether or not AddColumnOperation supports the passing in the old column, which was only added in EF Core 1.1.

(Inherited from MigrationsSqlGenerator)
PrimaryKeyConstraint(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a primary key constraint of an AddPrimaryKeyOperation.

(Inherited from MigrationsSqlGenerator)
SequenceOptions(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment configuring a sequence in a AlterSequenceOperation.

(Inherited from MigrationsSqlGenerator)
SequenceOptions(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment configuring a sequence in a CreateSequenceOperation.

(Inherited from MigrationsSqlGenerator)
SequenceOptions(String, String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, IModel, MigrationCommandListBuilder)

Generates a SQL fragment configuring a sequence with the given options.

(Inherited from MigrationsSqlGenerator)
SequenceOptions(String, String, SequenceOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment configuring a sequence with the given options.

(Inherited from MigrationsSqlGenerator)
TryGetVersion(IModel, String)

Gets the product version used to generate the current migration. Providers can use this to preserve compatibility with migrations generated using previous versions.

(Inherited from MigrationsSqlGenerator)
UniqueConstraint(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

Generates a SQL fragment for a unique constraint of an AddUniqueConstraintOperation.

(Inherited from MigrationsSqlGenerator)

Applies to