user1626137
user1626137

Reputation: 243

Entity Framework Code First Automatic Migrations to Azure Database

I'm using EF 5.0 Code First and am testing automatic migrations. Everything works fine when I'm working locally but when I upload the database to Azure and change the connection string accordingly the migration fails to work. I'm using the MigrateDatabaseToLatestVersion initializer. Is this something that Azure doesn't allow? I'm not getting any error. Just no migration. Ideas?

Upvotes: 4

Views: 705

Answers (1)

ikh
ikh

Reputation: 2436

Try doing something on the website that would trigger a call to DB.

I had this problem, until I realized that the migrations weren't run until you did something on the website that triggered a call to DB -- e.g. attempt to log in. My migrations were run only then.

Upvotes: 1

Related Questions