EF code first 更新数据库时,已更新完成,但是数据库没有更新

爱学习的火龙果 2014-07-22 04:35:08
PM> Enable-Migrations -Force -ContextTypeName "DataBaseContext" -ProjectName "DataBase" -StartUpProjectName "WDFramework" -ConnectionStringName "WDFramework" -Verbose
Using StartUp project 'WDFramework'.
Checking if the context targets an existing database...
Code First Migrations enabled for project DataBase.
PM> add-migration 988 -ProjectName "DataBase" -StartUpProjectName "WDFramework" -ConnectionStringName "WDFramework" -Verbose
Using StartUp project 'WDFramework'.
Scaffolding migration '988'.
The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running 'Add-Migration 988' again.
Target database is: 'KYGLDB1' (DataSource: 192.168.99.148, Provider: System.Data.SqlClient, Origin: Explicit).
PM> Update-Database -Script -ProjectName "DataBase" -StartUpProjectName "WDFramework" -ConnectionStringName "WDFramework" -Verbose
Using StartUp project 'WDFramework'.
Target database is: 'KYGLDB1' (DataSource: 192.168.99.148, Provider: System.Data.SqlClient, Origin: Explicit).
Applying explicit migrations: [201407220753266_988].
Applying explicit migration: 201407220753266_988.
PM>
...全文
157 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

594

社区成员

发帖
与我相关
我的任务
社区描述
提出问题
其他 技术论坛(原bbs)
社区管理员
  • community_281
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧