Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

MigrationInfoExtension.cs

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;
    }
}