To read about the MigrateDatabaseToLatestVersion initializer, try to start with this
If in brief:
AutomaticMigrationsEnabled = false;
Migration must be named and saved in project files that would be compiled and present in the Assembly: "Add-Migration -Name v1".
when you publish, select the checkbox "Execute code first migrations (runs on application start)" or added to the entityFramework section->contexts description need a DbContext with initializer description (Example
with we need MigrateDatabaseToLatestVersion in the end of the page).