Update from Sync Service
This commit is contained in:
12
dotNet知识库/EF CORE/EF Core Migration.md
Executable file
12
dotNet知识库/EF CORE/EF Core Migration.md
Executable file
@@ -0,0 +1,12 @@
|
||||
**EF Core Migration**
|
||||
**手动命令行的方式**
|
||||
Update-Database -Verbose -c safeMonitorDbContext
|
||||
|
||||
| | | |
|
||||
| ------------------------------------------- | --------------------------------- | ------------------------------- |
|
||||
| VSCode | VS2017 | 说明 |
|
||||
| dotnet ef migrations add InitialCreate | Add-Migration | 对当前EF实体模型增加一个配置文件 |
|
||||
| dotnet ef database update | Update-Database | 对当前版本进行更新 |
|
||||
| dotnet ef migrations remove | Remove-Migration | 删除最新的Migration |
|
||||
| dotnet ef database update LastGoodMigration | Update-Database LastGoodMigration | 对指定版本进行更新 |
|
||||
| dotnet ef migrations script | Script-Migration | 对当前更新生成一个sql的脚本,我们可以使用脚本到数据库取执行 |
|
||||
Reference in New Issue
Block a user