214176 (6) [Avatar] Offline
#1
I am building a replacement ASP.NET Core web site to replace an existing web site in my Azure App Service. I have made sure that all tables and column names are the same in the new web site code so that I may continue using the production database. Now that I feel like the development and production database schema match, I was going to delete the dev migrations and migration table. Then let EF Core regenerate an initial migration. My question was how do I keep using the production database, publish the new web site to the Azure App Service and not have any issues with the production migration table entries? Does the production migration table need to be deleted, rows truncated or what?

The existing web site is already hosted on an Azure App Service using a Azure SQL database and has been running fine for the past year. It is a MVC web application using standard MVC controllers and razor views. I am upgrading it to a Razor Pages web site but I want to continue using the existing Azure SQL database so that I can use my existing data. I have been very careful about keeping the EF entities the same and not doing anything that will change the database schema. I have even copied the production database down to my local machine, imported it into my local MSSQL Server and tested that the new web site against the production database schema which works perfectly fine. My only question is what if anything should be done with the Migrations table in the production database that EF core created? The last time I tried this when updating from ASP.NET Core 1.1 to ASP.NET Core 2.0 there were issues publishing the web site. I am trying to get a step ahead of this issue now that I am updating from ASP.NET 2.0 to ASP.NET 2.1.

Orgbrat