﻿using Microsoft.SharePoint.Client;

namespace IonFar.SharePoint.Migration
{
    /// <summary>
    /// Base class for code-based migrations.
    /// </summary>
    public abstract class Migration : IMigration
    {
        public abstract void Up(ClientContext clientContext, IUpgradeLog logger);

        public virtual void Down(ClientContext clientContext, IUpgradeLog logger) { }

        protected string BaseFolder
        {
            get
            {
                return System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
            }
        }
    }
}
﻿using Microsoft.SharePoint.Client;

namespace IonFar.SharePoint.Migration
{
    /// <summary>
    /// Base class for code-based migrations.
    /// </summary>
    public abstract class Migration : IMigration
    {
        public abstract void Up(ClientContext clientContext, IUpgradeLog logger);

        protected string BaseFolder
        {
            get
            {
                return System.IO.Path.GetDirectoryName(System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName);
            }
        }
    }
}
Remove Down() from Migrator (it is not used by the engine)
Remove Down() from Migrator (it is not used by the engine)
