mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-20 19:03:25 +08:00
Move handlers code to data migration implementation
--HG-- branch : dev
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Orchard.Data.Migration;
|
||||
using Orchard.ContentManagement.MetaData;
|
||||
using Orchard.Data.Migration;
|
||||
|
||||
namespace Orchard.Blogs.DataMigrations {
|
||||
public class BlogsDataMigration : DataMigrationImpl {
|
||||
@@ -22,5 +23,25 @@ namespace Orchard.Blogs.DataMigrations {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public int UpdateFrom1() {
|
||||
ContentDefinitionManager.AlterTypeDefinition("Blog",
|
||||
cfg => cfg
|
||||
.WithPart("Blog")
|
||||
.WithPart("CommonAspect")
|
||||
.WithPart("IsRoutable")
|
||||
);
|
||||
|
||||
ContentDefinitionManager.AlterTypeDefinition("BlogPost",
|
||||
cfg => cfg
|
||||
.WithPart("BlogPost")
|
||||
.WithPart("CommonAspect")
|
||||
.WithPart("PublishLaterPart")
|
||||
.WithPart("IsRoutable")
|
||||
.WithPart("BodyAspect")
|
||||
);
|
||||
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user