2010-11-09 16:00:51 -08:00
|
|
|
|
using Orchard.ContentManagement.MetaData;
|
2010-11-08 15:33:56 -08:00
|
|
|
|
using Orchard.Core.Contents.Extensions;
|
|
|
|
|
using Orchard.Data.Migration;
|
|
|
|
|
|
|
|
|
|
namespace Orchard.Core.Containers {
|
|
|
|
|
public class Migrations : DataMigrationImpl {
|
|
|
|
|
public int Create() {
|
|
|
|
|
SchemaBuilder.CreateTable("ContainerPartRecord",
|
2010-11-11 16:15:49 -08:00
|
|
|
|
table => table
|
|
|
|
|
.ContentPartRecord()
|
|
|
|
|
.Column<bool>("Paginated")
|
|
|
|
|
.Column<int>("PageSize")
|
|
|
|
|
.Column<string>("OrderByProperty")
|
|
|
|
|
.Column<int>("OrderByDirection"));
|
|
|
|
|
|
|
|
|
|
ContentDefinitionManager.AlterTypeDefinition("ContainerWidget",
|
|
|
|
|
cfg => cfg
|
|
|
|
|
.WithPart("CommonPart")
|
|
|
|
|
.WithPart("WidgetPart")
|
|
|
|
|
.WithPart("ContainerWidgetPart")
|
|
|
|
|
.WithSetting("Stereotype", "Widget"));
|
2010-11-08 15:33:56 -08:00
|
|
|
|
|
|
|
|
|
ContentDefinitionManager.AlterPartDefinition("ContainerPart", builder => builder.Attachable());
|
|
|
|
|
ContentDefinitionManager.AlterPartDefinition("ContainablePart", builder => builder.Attachable());
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|