I am using entity framework to attach to an existing database where I will add a few more tables. Someone on here said this is not possible and I would need to keep the new tables separate in a new database. Here is that question:
Do not create existing table during Migration
I did some more investigation and found this on MSDN:
https://msdn.microsoft.com/en-us/data/dn579398.aspx
According to this I should run an initial migration like this:
add-migration initial -ignorechanges
so I did that and that is supposed to look at the database and match it up. After I update the database, then I am supposed to add another migration without the -ignorechanges. When I do the second migration, I get this:
namespace PTEManager.Domain.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class second : DbMigration
{
public override void Up()
{
}
public override void Down()
{
}
}
}
so it is not trying to add the 2 new tables and relationships that I need. It is coming up blank. I have tried deleting the _migrationhistory table from the database and starting over but still nothing. What am I missing?