2020-03-05 15:21:27 +00:00
|
|
|
using System;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
namespace Jellyfin.Server.Migrations
|
|
|
|
{
|
2020-03-05 17:09:33 +00:00
|
|
|
/// <summary>
|
|
|
|
/// Interface that descibes a migration routine.
|
|
|
|
/// </summary>
|
|
|
|
internal interface IUpdater
|
|
|
|
{
|
2020-03-05 15:21:27 +00:00
|
|
|
/// <summary>
|
2020-03-05 17:09:33 +00:00
|
|
|
/// Gets the name of the migration, must be unique.
|
2020-03-05 15:21:27 +00:00
|
|
|
/// </summary>
|
2020-03-05 17:09:33 +00:00
|
|
|
public abstract string Name { get; }
|
2020-03-05 15:21:27 +00:00
|
|
|
|
2020-03-05 17:09:33 +00:00
|
|
|
/// <summary>
|
2020-03-05 17:52:00 +00:00
|
|
|
/// Execute the migration routine.
|
2020-03-05 17:09:33 +00:00
|
|
|
/// </summary>
|
|
|
|
/// <param name="host">Host that hosts current version.</param>
|
|
|
|
/// <param name="logger">Host logger.</param>
|
|
|
|
public abstract void Perform(CoreAppHost host, ILogger logger);
|
|
|
|
}
|
2020-03-05 15:21:27 +00:00
|
|
|
}
|