RelationalDatabaseFacadeExtensions.Migrate 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
| 속성 | Description |
|---|---|
| Migrate(DatabaseFacade) |
컨텍스트에 대해 보류 중인 모든 마이그레이션을 데이터베이스에 적용합니다. 데이터베이스가 아직 없는 경우 만듭니다. |
| Migrate(DatabaseFacade, String) |
컨텍스트에 대한 마이그레이션을 데이터베이스에 적용합니다. 데이터베이스가 아직 없는 경우 만듭니다. |
Migrate(DatabaseFacade)
컨텍스트에 대해 보류 중인 모든 마이그레이션을 데이터베이스에 적용합니다. 데이터베이스가 아직 없는 경우 만듭니다.
public static void Migrate(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")]
public static void Migrate(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade);
static member Migrate : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> unit
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")>]
static member Migrate : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade -> unit
<Extension()>
Public Sub Migrate (databaseFacade As DatabaseFacade)
매개 변수
- databaseFacade
- DatabaseFacade
컨텍스트의 경우입니다 DatabaseFacade .
- 특성
설명
이 API는 .와 EnsureCreated()함께 사용할 수 없습니다. EnsureCreated는 마이그레이션을 사용하여 데이터베이스를 만들지 않으므로 생성된 데이터베이스는 나중에 마이그레이션을 사용하여 업데이트할 수 없습니다.
자세한 내용 및 예제는 데이터베이스 마이그레이션 을 참조하세요.
적용 대상
Migrate(DatabaseFacade, String)
컨텍스트에 대한 마이그레이션을 데이터베이스에 적용합니다. 데이터베이스가 아직 없는 경우 만듭니다.
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")]
public static void Migrate(this Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade databaseFacade, string? targetMigration);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Migrations operations are not supported with NativeAOT Use a migration bundle or an alternate way of executing migration operations.")>]
static member Migrate : Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade * string -> unit
<Extension()>
Public Sub Migrate (databaseFacade As DatabaseFacade, targetMigration As String)
매개 변수
- databaseFacade
- DatabaseFacade
컨텍스트의 경우입니다 DatabaseFacade .
- targetMigration
- String
데이터베이스를 최신으로 마이그레이션하거나 null 최신으로 마이그레이션하기 위한 대상 마이그레이션입니다.
- 특성
설명
이 API는 .와 EnsureCreated()함께 사용할 수 없습니다. EnsureCreated는 마이그레이션을 사용하여 데이터베이스를 만들지 않으므로 생성된 데이터베이스는 나중에 마이그레이션을 사용하여 업데이트할 수 없습니다.
자세한 내용 및 예제는 데이터베이스 마이그레이션 을 참조하세요.