CRM Template with EF code first

Created New Crm Project, built it and ran it with no issues
Added public string CellPhone { get; set; } to Contact Model
Hi,

PM> add-migration cell -context crmdbcontext
PM> update-database -context crmdbcontext
Failed executing DbCommand (3ms) [Parameters=, CommandType='Text', CommandTimeout='30']
ALTER TABLE [Opportunities] DROP CONSTRAINT [FK_Opportunities_ApplicationUser_UserId];

How do I get around this error if I want to use Code first to add /modify the CRM website database?

Hi @StevenZ,

Indeed something in the CRM db configuration confuses the ef migrations tool and it generates codes to drop invalid database objects such as FK_Opportunities_ApplicationUser_UserId and others. Right now the only workaround is to manually edit the generated migration file. We are investigating what is causing the problem and will probably address it via new release.