0、设置运行环境变
setx ASPNETCORE_ENVIRONMENT “Build”
EF Core 代码迁移:
1.增加迁移 dotnet ef migrations add 名字
2.删除迁移 dotnet ef migrations remove
3.更新数据库 dotnet ef database update
4.生成脚本 dotnet ef migrations script
5.还原数据库版本 dotnet ef database update 名字
本文介绍了使用Entity Framework Core (EFCore)进行数据库迁移的基本步骤,包括如何创建、删除迁移文件,更新数据库到最新状态,生成数据库迁移脚本及回滚到特定版本的方法。
0、设置运行环境变
setx ASPNETCORE_ENVIRONMENT “Build”
EF Core 代码迁移:
1.增加迁移 dotnet ef migrations add 名字
2.删除迁移 dotnet ef migrations remove
3.更新数据库 dotnet ef database update
4.生成脚本 dotnet ef migrations script
5.还原数据库版本 dotnet ef database update 名字

被折叠的 条评论
为什么被折叠?