MigrationsSqlGenerator 클래스

정의

그런 다음, 의 목록에서 MigrationOperation실행하거나 스크립팅할 수 있는 개체에서 SQL MigrationCommand 을 생성합니다.

public class MigrationsSqlGenerator : Microsoft.EntityFrameworkCore.Migrations.IMigrationsSqlGenerator
type MigrationsSqlGenerator = class
    interface IMigrationsSqlGenerator
Public Class MigrationsSqlGenerator
Implements IMigrationsSqlGenerator
상속
MigrationsSqlGenerator
파생
구현

설명

이 클래스는 일반적으로 SQL 생성을 사용자 지정하기 위해 데이터베이스 공급자에 의해 상속됩니다.

서비스 수명은 입니다 Scoped. 즉, 각 DbContext instance 이 서비스의 자체 instance 사용합니다. 구현은 모든 수명에 등록된 다른 서비스에 따라 달라질 수 있습니다. 구현은 스레드로부터 안전할 필요가 없습니다.

자세한 내용 및 예제는 데이터베이스 마이그레이션 을 참조하세요.

생성자

MigrationsSqlGenerator(IRelationalCommandBuilderFactory, ISqlGenerationHelper, IRelationalTypeMapper, IRelationalAnnotationProvider)

그런 다음, 의 목록에서 MigrationOperation실행하거나 스크립팅할 수 있는 개체에서 SQL MigrationCommand 을 생성합니다.

MigrationsSqlGenerator(MigrationsSqlGeneratorDependencies)

지정된 종속성을 사용하여 새 MigrationsSqlGenerator instance 만듭니다.

속성

Annotations

그런 다음, 의 목록에서 MigrationOperation실행하거나 스크립팅할 수 있는 개체에서 SQL MigrationCommand 을 생성합니다.

Dependencies

이 서비스에 대한 관계형 공급자별 종속성입니다.

Options

명령을 생성할 때 사용할 옵션을 가져오거나 설정합니다.

SqlGenerationHelper

그런 다음, 의 목록에서 MigrationOperation실행하거나 스크립팅할 수 있는 개체에서 SQL MigrationCommand 을 생성합니다.

SqlGenerator

IUpdateSqlGenerator

TypeMapper

그런 다음, 의 목록에서 MigrationOperation실행하거나 스크립팅할 수 있는 개체에서 SQL MigrationCommand 을 생성합니다.

VersionComparer

두 제품 버전을 비교하는 데 사용할 수 있는 비교자를 가져옵니다.

메서드

CheckConstraint(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

의 검사 제약 조건에 대한 SQL 조각을 생성합니다AddCheckConstraintOperation.

CheckConstraint(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

의 검사 제약 조건에 대한 SQL 조각을 생성합니다CreateCheckConstraintOperation.

ColumnDefinition(AddColumnOperation, IModel, MigrationCommandListBuilder)

의 열 정의에 대한 SQL 조각을 생성합니다 AddColumnOperation.

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

지정된 열 메타데이터에 대한 열 정의에 대한 SQL 조각을 생성합니다.

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

지정된 열 메타데이터에 대한 열 정의에 대한 SQL 조각을 생성합니다.

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

지정된 열 메타데이터에 대한 열 정의에 대한 SQL 조각을 생성합니다.

ColumnList(String[])

지정된 열 이름을 DelimitIdentifier(String) 구분된 목록에 연결합니다.

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

지정된 열 메타데이터에 대한 계산 열 정의에 대한 SQL 조각을 생성합니다.

CreateTableCheckConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 검사 제약 조건에 대한 SQL 조각을 생성합니다CreateTableOperation.

CreateTableColumns(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 열 정의에 대한 SQL 조각을 생성합니다 CreateTableOperation.

CreateTableConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 제약 조건에 대한 SQL 조각을 생성합니다 CreateTableOperation.

CreateTableForeignKeys(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 외래 키 제약 조건에 대한 SQL 조각을 생성합니다 CreateTableOperation.

CreateTablePrimaryKeyConstraint(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 기본 키 제약 조건에 대한 SQL 조각을 생성합니다 CreateTableOperation.

CreateTableUniqueConstraints(CreateTableOperation, IModel, MigrationCommandListBuilder)

의 고유 제약 조건에 대한 SQL 조각을 생성합니다 CreateTableOperation.

DefaultValue(Object, String, MigrationCommandListBuilder)

열의 기본 제약 조건에 대한 SQL 조각을 생성합니다.

DefaultValue(Object, String, String, MigrationCommandListBuilder)

열의 기본 제약 조건에 대한 SQL 조각을 생성합니다.

EndStatement(MigrationCommandListBuilder, Boolean)

SQL 명령을 종료하는 SQL 조각을 생성합니다.

FindEntityTypes(IModel, String, String)
사용되지 않습니다..

지정된 테이블에 매핑되는 모든 IEntityType를 찾습니다.

FindProperty(IModel, String, String, String)
사용되지 않습니다..

지정된 열에 매핑된 일부 IProperty 항목을 찾습니다.

여러 속성이 동일한 열에 매핑되는 경우 반환되는 속성은 임의로 선택된 속성입니다. 모델 유효성 검사기는 지정된 열에 매핑된 모든 속성이 일관된 구성을 갖도록 합니다.

ForeignKeyAction(ReferentialAction, MigrationCommandListBuilder)

지정된 참조 작업에 대한 SQL 조각을 생성합니다.

ForeignKeyConstraint(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

의 외래 키 제약 조건에 대한 SQL 조각을 생성합니다 AddForeignKeyOperation.

Generate(AddCheckConstraintOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddCheckConstraintOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AddColumnOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddColumnOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AddColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddColumnOperation 에 대한 명령을 빌드합니다.

Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddForeignKeyOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AddForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddForeignKeyOperation 에 대한 명령을 빌드합니다.

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddPrimaryKeyOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddPrimaryKeyOperation 에 대한 명령을 빌드합니다.

Generate(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AddUniqueConstraintOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AlterColumnOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AlterColumnOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(AlterDatabaseOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AlterDatabaseOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AlterSequenceOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(AlterTableOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 AlterTableOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(CreateCheckConstraintOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateCheckConstraintOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateIndexOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(CreateIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateIndexOperation 에 대한 명령을 빌드합니다.

Generate(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateSequenceOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateTableOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(CreateTableOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 CreateTableOperation 에 대한 명령을 빌드합니다.

Generate(DeleteDataOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DeleteDataOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropCheckConstraintOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropCheckConstraintOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropColumnOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropColumnOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropColumnOperation 에 대한 명령을 빌드합니다.

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropForeignKeyOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropForeignKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropForeignKeyOperation 에 대한 명령을 빌드합니다.

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropIndexOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

이 메서드의 기본 구현은 을 throw합니다 NotImplementedException. 공급자는 이러한 종류의 작업을 지원하려면 재정의해야 합니다.

Generate(DropIndexOperation, IModel, MigrationCommandListBuilder, Boolean)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropIndexOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropPrimaryKeyOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropPrimaryKeyOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropPrimaryKeyOperation 에 대한 명령을 빌드합니다.

Generate(DropSchemaOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropSchemaOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropSequenceOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropSequenceOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropTableOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropTableOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(DropTableOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropTableOperation 에 대한 명령을 빌드합니다.

Generate(DropUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 DropUniqueConstraintOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(EnsureSchemaOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 EnsureSchemaOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(InsertDataOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 InsertDataOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(InsertDataOperation, IModel, MigrationCommandListBuilder, Boolean)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 InsertDataOperation 에 대한 명령을 빌드합니다.

Generate(IReadOnlyList<MigrationOperation>, IModel)

작업 목록에서 명령을 생성합니다.

Generate(IReadOnlyList<MigrationOperation>, IModel, MigrationsSqlGenerationOptions)

작업 목록에서 명령을 생성합니다.

Generate(MigrationOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 MigrationOperation 에 대한 명령을 빌드합니다.

Generate(RenameColumnOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 RenameColumnOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(RenameIndexOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 RenameIndexOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(RenameSequenceOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 RenameSequenceOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(RenameTableOperation, IModel, MigrationCommandListBuilder)

데이터베이스 공급자가 지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 RenameTableOperation 에 대한 명령을 빌드하도록 재정의할 수 있습니다.

Generate(RestartSequenceOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 RestartSequenceOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(SqlOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 SqlOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

Generate(UpdateDataOperation, IModel, MigrationCommandListBuilder)

지정된 MigrationCommandListBuilder에 대해 호출하여 지정된 UpdateDataOperation 에 대한 명령을 빌드한 다음, 최종 명령을 종료합니다.

GenerateIndexColumnList(CreateIndexOperation, IModel, MigrationCommandListBuilder)

에서 인덱스의 열 목록에 대한 SQL 조각을 반환합니다 CreateIndexOperation.

GenerateModificationCommands(DeleteDataOperation, IModel)

지정된 작업에 해당하는 명령을 생성합니다.

GenerateModificationCommands(InsertDataOperation, IModel)

지정된 작업에 해당하는 명령을 생성합니다.

GenerateModificationCommands(UpdateDataOperation, IModel)

지정된 작업에 해당하는 명령을 생성합니다.

GetColumnType(String, String, String, ColumnOperation, IModel)

제공된 메타데이터가 지정된 열의 저장소/데이터베이스 형식을 가져옵니다.

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

제공된 메타데이터가 지정된 열의 저장소/데이터베이스 형식을 가져옵니다.

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

제공된 메타데이터가 지정된 열의 저장소/데이터베이스 형식을 가져옵니다.

HasLegacyRenameOperations(IModel)

변경되지 않은 RenameTableOperationRenameSequenceOperation 경우 새 이름과 스키마를 null로 설정하는 레거시 동작을 사용하고 있는지 여부를 확인합니다.

IndexOptions(CreateIndexOperation, IModel, MigrationCommandListBuilder)

에서 인덱 CreateIndexOperation스의 추가 항목(필터, 포함된 열, 옵션)에 대한 SQL 조각을 생성합니다.

IndexTraits(MigrationOperation, IModel, MigrationCommandListBuilder)

, AddPrimaryKeyOperation또는 AddUniqueConstraintOperation에서 CreateIndexOperation인덱스의 특성에 대한 SQL 조각을 생성합니다.

IsOldColumnSupported(IModel)

EF Core 1.1에만 추가된 이전 열의 전달을 지원하는지 AddColumnOperation 여부를 확인합니다.

PrimaryKeyConstraint(AddPrimaryKeyOperation, IModel, MigrationCommandListBuilder)

의 기본 키 제약 조건에 대한 SQL 조각을 생성합니다 AddPrimaryKeyOperation.

SequenceOptions(AlterSequenceOperation, IModel, MigrationCommandListBuilder)

에서 시퀀스를 구성하는 SQL 조각을 생성합니다 AlterSequenceOperation.

SequenceOptions(CreateSequenceOperation, IModel, MigrationCommandListBuilder)

에서 시퀀스를 구성하는 SQL 조각을 생성합니다 CreateSequenceOperation.

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

지정된 옵션을 사용하여 시퀀스를 구성하는 SQL 조각을 생성합니다.

SequenceOptions(String, String, SequenceOperation, IModel, MigrationCommandListBuilder)

지정된 옵션을 사용하여 시퀀스를 구성하는 SQL 조각을 생성합니다.

TryGetVersion(IModel, String)

현재 마이그레이션을 생성하는 데 사용되는 제품 버전을 가져옵니다. 공급자는 이를 사용하여 이전 버전을 사용하여 생성된 마이그레이션과의 호환성을 유지할 수 있습니다.

UniqueConstraint(AddUniqueConstraintOperation, IModel, MigrationCommandListBuilder)

의 고유한 제약 조건에 대한 SQL 조각을 생성합니다 AddUniqueConstraintOperation.

적용 대상