I have an ASP.NET Web API which is already running for quite some time on production. I need to quickly add some fields to an existing model/table on my production. Sometimes it is tedious dealing with EF migrations. So adding this additional property to the model and manually altering the database table seems OK for me. That's why I am trying to figure it out using
C#
Database.SetInitializer(null);is it a good practice to add this line of code (in global.asax) to production? Any suggestions would be great.
Thank you.

Arun Raja32 reputationPosted Oct 26, 2021, 8:59 AM EDT
using FluentMigrator;Collect the UP migration expressions
using Nop.Core.Domain.Catalog;
namespace Nop.Data.Migrations
{
public class AddSomeNewProperty: AutoReversingMigration
{ ///
public override void Up()
{
Create.Column(nameof(Category.SomeNewProperty))
.OnTable(nameof(Category))
.AsString(255)
.Nullable();
}
}
}
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Oct 27, 2021, 8:34 AM EDT