Remove unecessary casting, handle sorting migrations in extension
This commit is contained in:
@@ -5,11 +5,11 @@ namespace SPTarkov.Server.Core.Migration;
|
||||
|
||||
public abstract class AbstractProfileMigration : IProfileMigration
|
||||
{
|
||||
public virtual string MigrationName { get; }
|
||||
public virtual IEnumerable<Type> PrerequisiteMigrations { get; }
|
||||
|
||||
public abstract string FromVersion { get; }
|
||||
public abstract string ToVersion { get; }
|
||||
public abstract string MigrationName { get; }
|
||||
|
||||
public abstract IEnumerable<Type> PrerequisiteMigrations { get; }
|
||||
|
||||
public abstract bool CanMigrate(JsonObject profile, IEnumerable<IProfileMigration> previouslyRanMigrations);
|
||||
|
||||
|
||||
@@ -5,6 +5,16 @@ namespace SPTarkov.Server.Core.Migration;
|
||||
|
||||
public interface IProfileMigration
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the migration
|
||||
/// </summary>
|
||||
public abstract string MigrationName { get; }
|
||||
|
||||
/// <summary>
|
||||
/// An IEnumerable of migrations that need to come before the current one
|
||||
/// </summary>
|
||||
public abstract IEnumerable<Type> PrerequisiteMigrations { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Allows for adding checks if the profile in question can migrate
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user