refactored IUpgradeable to use the migration attribute approach
This commit is contained in:
9
Oqtane.Server/Infrastructure/Interfaces/ISiteUpgrade.cs
Normal file
9
Oqtane.Server/Infrastructure/Interfaces/ISiteUpgrade.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface ISiteUpgrade
|
||||
{
|
||||
bool Upgrade(Site site, Alias alias);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
using Oqtane.Models;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
public interface IUpgradeable
|
||||
{
|
||||
string GetVersions(Alias alias);
|
||||
|
||||
bool Upgrade(Alias alias, string version);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Infrastructure
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class)]
|
||||
public class SiteUpgradeAttribute : Attribute
|
||||
{
|
||||
private string aliasname;
|
||||
private string version;
|
||||
|
||||
public SiteUpgradeAttribute(string AliasName, string Version)
|
||||
{
|
||||
aliasname = AliasName;
|
||||
version = Version;
|
||||
}
|
||||
|
||||
public virtual string AliasName
|
||||
{
|
||||
get { return aliasname; }
|
||||
}
|
||||
|
||||
public virtual string Version
|
||||
{
|
||||
get { return version; }
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user