修改数据库迁移脚本
This commit is contained in:
parent
0b1c871c7e
commit
4443d55057
@ -18,7 +18,7 @@ dotnet ef database update
|
|||||||
await dbContext.Database.EnsureCreatedAsync();
|
await dbContext.Database.EnsureCreatedAsync();
|
||||||
```
|
```
|
||||||
|
|
||||||
`EnsureCreatedAsync` 会创建数据库,并会创建所有表,但不会应用迁移脚本,适用于开发环境。
|
`EnsureCreatedAsync` 会创建数据库(如果不存在),并会创建所有表,但不会应用迁移脚本,适用于开发环境。
|
||||||
|
|
||||||
## 使用代码将最新迁移脚本应用到数据库
|
## 使用代码将最新迁移脚本应用到数据库
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user