Esempio n. 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);
        }
        public int UpdateFrom4()
        {
            SchemaBuilder.CreateTable(typeof(FacebookConnectSettingsPartRecord).Name,
                                      table => table
                                      .ContentPartRecord()
                                      .Column <string>("Permissions")
                                      .Column <bool>("AutoLogin")
                                      .Column <bool>("OnlyAllowVerified")
                                      .Column <bool>("SimpleRegistration")
                                      );

            ContentDefinitionManager.AlterTypeDefinition("FacebookConnectWidget",
                                                         cfg => cfg
                                                         .RemovePart("FacebookConnectPart")
                                                         .WithPart(typeof(FacebookConnectWidgetPart).Name));

            ContentDefinitionManager.DeletePartDefinition("FacebookConnectPart");

            SchemaBuilder.DropTable("FacebookConnectPartRecord");

            return(5);
        }
Esempio n. 3
0
 public void Uninstall( )
 {
     ContentDefinitionManager.DeleteTypeDefinition("BlogPostMenuItem");
     ContentDefinitionManager.DeletePartDefinition("BlogPostMenuItemPart");
     SchemaBuilder.DropTable("BlogPostMenuItemPartRecord");
 }