示例#1
0
        public int UpdateFrom1()
        {
            SchemaBuilder.CreateTable("ListViewPartRecord",
                                      table => table
                                      .ContentPartRecord()
                                      .Column <string>("ItemContentType")
                                      .Column <string>("VisableTo")
                                      );

            ContentDefinitionManager.DeleteTypeDefinition("LayoutProperty");
            ContentDefinitionManager.DeletePartDefinition("LayoutPropertyPart");

            SchemaBuilder.ExecuteSql(string.Format(@"INSERT INTO {0}Coevery_Projections_ListViewPartRecord(Id,ItemContentType,VisableTo)
                                       SELECT Id = v.ProjectionPartRecord_id, ItemContentType = t.Name,VisableTo = 'All' 
                                       FROM     {0}Coevery_Core_ViewPartRecord v 
                                                INNER JOIN {0}Settings_ContentTypeDefinitionRecord t 
                                                ON t.Id = v.ContentTypeDefinitionRecord_id", DataTablePrefix()));

            var dropViewPartRecordTable = _dialect.GetDropTableString("Coevery_Core_ViewPartRecord");

            SchemaBuilder.ExecuteSql(dropViewPartRecordTable);
            SchemaBuilder.DropTable("LayoutPropertyRecord");

            ContentDefinitionManager.AlterTypeDefinition("ListViewPage",
                                                         cfg => cfg
                                                         .WithPart("ListViewPart")
                                                         .WithPart("ProjectionPart")
                                                         .DisplayedAs("List View"));

            return(2);
        }
示例#2
0
 public int UpdateFrom5()
 {
     ContentDefinitionManager.DeleteTypeDefinition("ProjectTask");
     ContentDefinitionManager.AlterTypeDefinition("ProjectTaskMgmt", builder => builder
                                                  .DisplayedAs("ProjectManagement")
                                                  .WithPart("TaskMgmtPart")
                                                  .WithPart("CommonPart")
                                                  .WithPart("TitlePart")
                                                  .WithPart("BodyPart")
                                                  .Creatable()
                                                  .Draftable());
     return(6);
 }
示例#3
0
        public int UpdateFrom4()
        {
            ContentDefinitionManager.DeleteTypeDefinition("CustomPropertiesPart");
            SchemaBuilder.DropTable("CustomPropertiesPartRecord");
            SchemaBuilder.AlterTable("ContainerPartRecord", table => {
                table.DropColumn("ItemContentType");
                table.AddColumn <string>("ItemContentTypes");
                table.AddColumn <bool>("ShowOnAdminMenu");
                table.AddColumn <string>("AdminMenuText", c => c.WithLength(50));
                table.AddColumn <string>("AdminMenuPosition", c => c.WithLength(50));
                table.AddColumn <string>("AdminMenuImageSet", c => c.WithLength(50));
                table.AddColumn <bool>("EnablePositioning");
                table.AddColumn <string>("AdminListViewName", c => c.WithLength(50));
                table.AddColumn <int>("ItemCount");
            });

            SchemaBuilder.AlterTable("ContainablePartRecord", table => {
                table.DropColumn("Weight");
                table.AddColumn <int>("Position");
            });

            return(6);
        }
 public void Uninstall()
 {
     ContentDefinitionManager.DeleteTypeDefinition("CustomForm");
 }
示例#5
0
 public void Uninstall( )
 {
     ContentDefinitionManager.DeleteTypeDefinition("BlogPostMenuItem");
     ContentDefinitionManager.DeletePartDefinition("BlogPostMenuItemPart");
     SchemaBuilder.DropTable("BlogPostMenuItemPartRecord");
 }