关于实体框架数据库生成电源包

发布于 2024-10-09 11:03:59 字数 344 浏览 2 评论 0原文

在更改 EF edmx 文件后,我尝试使用此包进行数据库迁移。 但我总是收到以下错误:

Creating [sg].[Addresses]...
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Addresses' in the database.
** An error was encountered during execution of batch. Exiting.

地址表肯定在数据库中,因为这是一个迁移脚本。我选择“生成迁移T-SQL.xaml(VS)”策略来生成数据库。为什么脚本没有解决这个问题?

I've tried using this pack to do database migration after I changed the EF edmx file.
But I always receive following error:

Creating [sg].[Addresses]...
Msg 2714, Level 16, State 6, Line 1
There is already an object named 'Addresses' in the database.
** An error was encountered during execution of batch. Exiting.

The addresses table is in database for sure, because this is a migration script. I selected "Generate Migration T-SQL.xaml (VS)" strategy for generating database. How come the script does not address this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一梦浮鱼 2024-10-16 11:03:59

它仍然应该位于您正在生成的单独的新数据库中......好吧......新数据库。这是迁移的事实仅意味着正在考虑(可能)移动现有数据/元数据。这并不意味着它会改变现有的数据库。

It should still be in a separate, new database that you are generating the... well... new database. The fact that it is a migration just means that existing data/metadata is being taken into account to (possibly) be moved. It does not mean it alters the existing database.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文