Enable-Migrations
Enables Code First Migrations in a project.
Syntax
Enable-Migrations [-ContextTypeName <String>] [-EnableAutomaticMigrations]
[-MigrationsDirectory <String>] [-ProjectName <String>] [-StartUpProjectName <String>]
[-ContextProjectName <String>] [-ConnectionStringName <String>] [-Force]
[-ContextAssemblyName <String>] [-AppDomainBaseDirectory <String>] [<CommonParameters>]
Enable-Migrations [-ContextTypeName <String>] [-EnableAutomaticMigrations]
[-MigrationsDirectory <String>] [-ProjectName <String>] [-StartUpProjectName <String>]
[-ContextProjectName <String>] -ConnectionString <String>
-ConnectionProviderName <String> [-Force] [-ContextAssemblyName <String>]
[-AppDomainBaseDirectory <String>] [<CommonParameters>]
|
Description
Enables Migrations by scaffolding a migrations configuration class in the project. If the target database was created by an initializer, an initial migration will be created (unless automatic migrations are enabled via the EnableAutomaticMigrations parameter).
Add-Migration
Scaffolds a migration script for any pending model changes.
Syntax
Add-Migration [-Name] <String> [-Force] [-ProjectName <String>] [-StartUpProjectName <String>]
[-ConfigurationTypeName <String>] [-ConnectionStringName <String>] [-IgnoreChanges]
[-AppDomainBaseDirectory <String>] [<CommonParameters>]
Add-Migration [-Name] <String> [-Force] [-ProjectName <String>] [-StartUpProjectName <String>]
[-ConfigurationTypeName <String>] -ConnectionString <String> -ConnectionProviderName <String>
[-IgnoreChanges] [-AppDomainBaseDirectory <String>] [<CommonParameters>]
|
Description
Scaffolds a new migration script and adds it to the project.
Update-Database
Applies any pending migrations to the database.
Syntax
Update-Database [-SourceMigration <String>] [-TargetMigration <String>] [-Script] [-Force]
[-ProjectName <String>] [-StartUpProjectName <String>] [-ConfigurationTypeName <String>]
[-ConnectionStringName <String>] [-AppDomainBaseDirectory <String>] [<CommonParameters>]
Update-Database [-SourceMigration <String>] [-TargetMigration <String>] [-Script] [-Force]
[-ProjectName <String>] [-StartUpProjectName <String>] [-ConfigurationTypeName <String>]
-ConnectionString <String> -ConnectionProviderName <String>
[-AppDomainBaseDirectory <String>] [<CommonParameters>]
|
Description
Updates the database to the current model by applying pending migrations.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น