using System.Reflection; using FluentMigrator.Infrastructure; namespace Nop.Data.Migrations; public static partial class MigrationInfoExtension { /// /// Gets the flag which indicate whether the migration should be applied into DB on the debug mode /// public static bool IsNeedToApplyInDbOnDebugMode(this IMigrationInfo info) { var applyInDbOnDebugMode = info.Migration.GetType().GetCustomAttribute()?.ApplyInDbOnDebugMode; return applyInDbOnDebugMode ?? true; } }