mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-24 05:42:10 +08:00
Streamlining Migrations.cs for Orchard.PublishLater and adding description for ArchiveLaterPart
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user