-
-
Save ManfredLange/8cb845851f8eb5081381f7e8ae7d1a09 to your computer and use it in GitHub Desktop.
Abstract base class for migations that do not require a Down() method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics.CodeAnalysis; | |
using FluentMigrator; | |
namespace CmdLine.DataAccess.Migrations | |
{ | |
public abstract class UpOnlyMigration : Migration | |
{ | |
/// <summary> | |
/// Do not override/implement this method. [Manfred] | |
/// </summary> | |
/// <remarks>We never go back, so no need to implement this method. [Manfred]</remarks> | |
/// <exception cref="NotImplementedException">Thrown at all times.</exception> | |
[SuppressMessage("General", "RCS1079:Throwing of new NotImplementedException.", Justification = "Method not needed.")] | |
public sealed override void Down() | |
{ | |
throw new NotImplementedException(); | |
} | |
public abstract override void Up(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment