I'm trying to run update-database -verbose
on my project but I keep getting this error
Cannot find the object "dbo.Series", because it does not exist or you do not have permission.
I've looked at other examples on stackoverflow regarding this error message but they were all different situations. In my case the 'dbo.Series' actually does exist in my code and I can see it present in my database on SQL.
Here is the Up()
code in the latest migration file.
public override void Up()
{
AddColumn("dbo.Series", "FixtureId", c => c.Int());
AddColumn("dbo.Fixture", "SeriesId", c => c.Int());
CreateIndex("dbo.Series", "FixtureId");
CreateIndex("dbo.Fixture", "SeriesId");
AddForeignKey("dbo.Series", "FixtureId", "dbo.Fixture", "Id");
AddForeignKey("dbo.Fixture", "SeriesId", "dbo.Series", "Id");
}
Is there anyway to get my migrations and current database back on the same page?
Thanks