The recent changes to the structure of the migrations history table seem to have broken the Migrate initializer.
Repro:
Create program as shown in program.cs
PM> Install-package entityframework -pre -version 6.0.0-beta1-20501
PM> Enable-Migrations -EnableAutomaticMigrations
Run the application
Issue: EntityException was unhandled "the underlying provider failed to open"
inner: Cannot open database \"IssueReproMigrations109x.EntityContext\" requested by the login. The
login failed.\r\nLogin failed for user "..."
PM> Add-Migration a
PM> Update-Database
Run the application
Issue: NotSupportedException was unhandled "Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations."
Repro:
Create program as shown in program.cs
PM> Install-package entityframework -pre -version 6.0.0-beta1-20501
PM> Enable-Migrations -EnableAutomaticMigrations
Run the application
Issue: EntityException was unhandled "the underlying provider failed to open"
inner: Cannot open database \"IssueReproMigrations109x.EntityContext\" requested by the login. The
login failed.\r\nLogin failed for user "..."
PM> Add-Migration a
PM> Update-Database
Run the application
Issue: NotSupportedException was unhandled "Model compatibility cannot be checked because the database does not contain model metadata. Model compatibility can only be checked for databases created using Code First or Code First Migrations."