I have this Web.config
<connectionStrings>
<add name="AuthContext" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=mokey;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
and
Web.Release.config
<connectionStrings>
<add xdt:Transform="SetAttributes" xdt:Locator="Match(name)" name="AuthContext" providerName="MySql.Data.MySqlClient" connectionString="server=mysql2.gear.host;database=mokey;persistsecurityinfo=True" />
</connectionStrings>
So I have two databases, local vs production.
Now when I run update-database local database is updated.
How do I run update-database for production database, that is migrate database to latest version?
AutomaticMigrationsEnabledenabled in yourConfigurationclass? If yes, when you deploy to production it will update the production database to latest version