Streamlining Migrations.cs for Orchard.PublishLater and adding description for ArchiveLaterPart

This commit is contained in:
Lombiq
2015-01-20 18:55:51 +01:00
committed by Benedek Farkas
parent 9320e48b09
commit 604dfb67bf
2 changed files with 16 additions and 4 deletions

View File

@@ -5,8 +5,18 @@ using Orchard.Data.Migration;
namespace Orchard.ArchiveLater {
public class Migrations : DataMigrationImpl {
public int Create() {
ContentDefinitionManager.AlterPartDefinition("ArchiveLaterPart", builder => builder.Attachable());
return 1;
ContentDefinitionManager.AlterPartDefinition("ArchiveLaterPart", builder => builder
.Attachable()
.WithDescription("Adds the ability to delay the unpublishing of a content item to a later date and time."));
return 2;
}
public int UpdateFrom1() {
ContentDefinitionManager.AlterPartDefinition("ArchiveLaterPart", builder => builder
.WithDescription("Adds the ability to delay the unpublising of a content item to a later date and time."));
return 2;
}
}
}

View File

@@ -5,9 +5,11 @@ using Orchard.Data.Migration;
namespace Orchard.PublishLater {
public class Migrations : DataMigrationImpl {
public int Create() {
ContentDefinitionManager.AlterPartDefinition("PublishLaterPart", builder => builder.Attachable());
ContentDefinitionManager.AlterPartDefinition("PublishLaterPart", builder => builder
.Attachable()
.WithDescription("Adds the ability to delay the publication of a content item to a later date and time."));
return 1;
return 2;
}
public int UpdateFrom1() {