在本地运行的Azure Mobile服务器项目 [英] Running Azure Mobile Server project locally
问题描述
我在本地使用本地SQL数据库上运行的移动Azure的服务器项目。
我从快速启动项目的启动,但只要我改变实体到更复杂的东西,我得到这个错误与我的迁移:
I'm running an Azure Mobile Server project locally with a local SQL Database. I started from the Quickstart project, but as soon as I change the Entity to something more complex, I get this error with my migration:
无法创建比在表中的一个聚集索引更多...
即使有正确的模式我得到这个其他错误:
Even with the correct schema I get this other error:
不支持,影响迁徙历史系统表的位置(如默认架构更改)自动迁移。请使用code型迁移为影响迁移历史系统的位置操作表。
推荐答案
如果你使用的迁移,有一个机会,EF试图创建两个主键和CreatedAt列作为聚集索引。如果你告诉迁移到使用的Azure移动服务/应用SqlGenerator,它应该做的正确的事情。
If you're using migrations, there's a chance that EF is trying to create both the primary key and CreatedAt column as clustered indexes. If you tell the migration to use the Azure Mobile Services/Apps SqlGenerator, it should do the right thing.
See if my answer here fixes the issue for you.
这篇关于在本地运行的Azure Mobile服务器项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!