mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-04-01 17:48:00 +02:00
40 lines
894 B
C#
40 lines
894 B
C#
namespace VoidCat.Services.Migrations;
|
|
|
|
/// <summary>
|
|
/// Startup migrations
|
|
/// </summary>
|
|
public interface IMigration
|
|
{
|
|
/// <summary>
|
|
/// Order to run migrations
|
|
/// </summary>
|
|
int Order { get; }
|
|
|
|
/// <summary>
|
|
/// Run migration
|
|
/// </summary>
|
|
/// <param name="args"></param>
|
|
/// <returns></returns>
|
|
ValueTask<MigrationResult> Migrate(string[] args);
|
|
|
|
/// <summary>
|
|
/// Results of running migration
|
|
/// </summary>
|
|
public enum MigrationResult
|
|
{
|
|
/// <summary>
|
|
/// Migration was not run
|
|
/// </summary>
|
|
Skipped,
|
|
|
|
/// <summary>
|
|
/// Migration completed successfully, continue to startup
|
|
/// </summary>
|
|
Completed,
|
|
|
|
/// <summary>
|
|
/// Migration completed Successfully, exit application
|
|
/// </summary>
|
|
ExitCompleted
|
|
}
|
|
} |