다음을 통해 공유


DbMigrator 클래스

정의

DbMigrator는 데이터베이스에 기존 마이그레이션을 적용하는 데 사용됩니다. DbMigrator를 사용하여 지정된 마이그레이션으로 업그레이드 및 다운그레이드할 수 있습니다. 모델 변경 내용에 따라 마이그레이션을 스캐폴드하려면 다음을 사용합니다. MigrationScaffolder

public class DbMigrator : System.Data.Entity.Migrations.Infrastructure.MigratorBase
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1506:AvoidExcessiveClassCoupling")]
public class DbMigrator : System.Data.Entity.Migrations.Infrastructure.MigratorBase
type DbMigrator = class
    inherit MigratorBase
Public Class DbMigrator
Inherits MigratorBase
상속
DbMigrator
특성

생성자

DbMigrator(DbMigrationsConfiguration)

DbMigrator 클래스의 새 instance 초기화합니다.

필드

InitialDatabase

마이그레이션이 적용되기 전에 데이터베이스의 상태를 나타내는 마이그레이션 ID입니다.

속성

Configuration

마이그레이션 프로세스에 사용되는 구성을 가져옵니다.

메서드

GetDatabaseMigrations()

대상 데이터베이스에 적용된 모든 마이그레이션을 가져옵니다.

GetLocalMigrations()

구성된 마이그레이션 어셈블리에 정의된 모든 마이그레이션을 가져옵니다.

GetPendingMigrations()

어셈블리에 정의되어 있지만 대상 데이터베이스에 적용되지 않은 모든 마이그레이션을 가져옵니다.

Update()

대상 데이터베이스를 최신 마이그레이션으로 업데이트.

(다음에서 상속됨 MigratorBase)
Update(String)

대상 데이터베이스를 지정된 마이그레이션으로 업데이트.

적용 대상