Search Results for

    Show / Hide Table of Contents

    Interface ICustomUpgrader

    Namespace: LemonEdge.API.Core.Migrations
    Assembly: LemonEdge.API.Core.Migrations.dll
    Syntax
    public interface ICustomUpgrader

    Properties

    AlwaysRunOnUpgrade

    Indicates if this custom upgrader should always be run when the db is upgrading

    (RequiresDBUpgrade(ICustomUpgradeVersionHandler) can still be false indicating this should not force the db to upgrade, but if it is upgrading then it should run too)

    Declaration
    bool AlwaysRunOnUpgrade { get; }
    Property Value
    Type Description
    bool

    CustomSQLUpgradeInCoreUpgrade

    Custom sql that will be executed during the core upgrade when entitydescriptor schemas can be modified

    Declaration
    string CustomSQLUpgradeInCoreUpgrade { get; }
    Property Value
    Type Description
    string

    Order

    The custom order in which this upgrade should be run

    Declaration
    short Order { get; }
    Property Value
    Type Description
    short

    Methods

    GetDescriptorsToUpgradeInCore(IEnumerable<EntityDescriptor>)

    Returns the list of descriptors that are affected by the core custom sql upgrade, and thus need the entity descriptor functions removed before the custom sql is executed

    Declaration
    IEnumerable<EntityDescriptor> GetDescriptorsToUpgradeInCore(IEnumerable<EntityDescriptor> allDescriptors)
    Parameters
    Type Name Description
    IEnumerable<EntityDescriptor> allDescriptors
    Returns
    Type Description
    IEnumerable<EntityDescriptor>

    RequiresDBUpgrade(ICustomUpgradeVersionHandler)

    Inidicates the database needs to be updated, and that this customupgrade must run

    Declaration
    Task<bool> RequiresDBUpgrade(ICustomUpgradeVersionHandler upgradeVersionHandler)
    Parameters
    Type Name Description
    ICustomUpgradeVersionHandler upgradeVersionHandler

    The version handler which can be used to interogate if upgrades have already been run or not

    Returns
    Type Description
    Task<bool>

    RunCustomUpgrade(CustomUpgradeHelper)

    Allows the implementing class to run a custom upgrade on the database after the core entity descriptors have been upgraded

    Declaration
    Task RunCustomUpgrade(CustomUpgradeHelper helper)
    Parameters
    Type Name Description
    CustomUpgradeHelper helper

    A helper class providing functionality to modify the database for upgrading

    Returns
    Type Description
    Task

    A task indicating the completion of the custom upgrade

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.