diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.Designer.cs similarity index 96% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.Designer.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.Designer.cs index df5ded83e3..ec4a94873a 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.Designer.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.Designer.cs @@ -11,7 +11,7 @@ using Volo.CmsKit.EntityFrameworkCore; namespace Volo.CmsKit.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20210614072230_Initial")] + [Migration("20210622142314_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -71,9 +71,7 @@ namespace Volo.CmsKit.Migrations .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)") - .HasColumnName("Exceptions"); + .HasColumnType("nvarchar(max)"); b.Property("ExecutionDuration") .HasColumnType("int") @@ -1458,7 +1456,7 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsMediaDescriptors"); }); - modelBuilder.Entity("Volo.CmsKit.Menus.Menu", b => + modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1478,61 +1476,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsMainMenu") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsMenus"); - }); - - modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - b.Property("CssClass") .HasColumnType("nvarchar(max)"); @@ -1544,6 +1487,10 @@ namespace Volo.CmsKit.Migrations b.Property("ElementId") .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property("Icon") .HasColumnType("nvarchar(max)"); @@ -1558,9 +1505,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MenuId") - .HasColumnType("uniqueidentifier"); - b.Property("Order") .HasColumnType("int"); @@ -1573,6 +1517,10 @@ namespace Volo.CmsKit.Migrations b.Property("Target") .HasColumnType("nvarchar(max)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + b.Property("Url") .IsRequired() .HasMaxLength(1024) @@ -1580,8 +1528,6 @@ namespace Volo.CmsKit.Migrations b.HasKey("Id"); - b.HasIndex("MenuId"); - b.ToTable("CmsMenuItems"); }); @@ -2039,15 +1985,6 @@ namespace Volo.CmsKit.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => - { - b.HasOne("Volo.CmsKit.Menus.Menu", null) - .WithMany("Items") - .HasForeignKey("MenuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Navigation("Actions"); @@ -2087,11 +2024,6 @@ namespace Volo.CmsKit.Migrations { b.Navigation("ConnectionStrings"); }); - - modelBuilder.Entity("Volo.CmsKit.Menus.Menu", b => - { - b.Navigation("Items"); - }); #pragma warning restore 612, 618 } } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.cs similarity index 97% rename from modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.cs rename to modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.cs index 55ba6e859f..eeb028c28f 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210614072230_Initial.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20210622142314_Initial.cs @@ -28,7 +28,7 @@ namespace Volo.CmsKit.Migrations BrowserInfo = table.Column(type: "nvarchar(512)", maxLength: 512, nullable: true), HttpMethod = table.Column(type: "nvarchar(16)", maxLength: 16, nullable: true), Url = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - Exceptions = table.Column(type: "nvarchar(4000)", maxLength: 4000, nullable: true), + Exceptions = table.Column(type: "nvarchar(max)", nullable: true), Comments = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), HttpStatusCode = table.Column(type: "int", nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), @@ -369,26 +369,31 @@ namespace Volo.CmsKit.Migrations }); migrationBuilder.CreateTable( - name: "CmsMenus", + name: "CmsMenuItems", columns: table => new { Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: true), - IsMainMenu = table.Column(type: "bit", nullable: false), + ParentId = table.Column(type: "uniqueidentifier", nullable: true), + DisplayName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), + IsActive = table.Column(type: "bit", nullable: false), + Url = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), + Icon = table.Column(type: "nvarchar(max)", nullable: true), + Order = table.Column(type: "int", nullable: false), + Target = table.Column(type: "nvarchar(max)", nullable: true), + ElementId = table.Column(type: "nvarchar(max)", nullable: true), + CssClass = table.Column(type: "nvarchar(max)", nullable: true), + PageId = table.Column(type: "uniqueidentifier", nullable: true), TenantId = table.Column(type: "uniqueidentifier", nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), CreationTime = table.Column(type: "datetime2", nullable: false), CreatorId = table.Column(type: "uniqueidentifier", nullable: true), LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - IsDeleted = table.Column(type: "bit", nullable: false, defaultValue: false), - DeleterId = table.Column(type: "uniqueidentifier", nullable: true), - DeletionTime = table.Column(type: "datetime2", nullable: true) + LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) }, constraints: table => { - table.PrimaryKey("PK_CmsMenus", x => x.Id); + table.PrimaryKey("PK_CmsMenuItems", x => x.Id); }); migrationBuilder.CreateTable( @@ -750,38 +755,6 @@ namespace Volo.CmsKit.Migrations onDelete: ReferentialAction.Cascade); }); - migrationBuilder.CreateTable( - name: "CmsMenuItems", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - MenuId = table.Column(type: "uniqueidentifier", nullable: false), - ParentId = table.Column(type: "uniqueidentifier", nullable: true), - DisplayName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsActive = table.Column(type: "bit", nullable: false), - Url = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), - Icon = table.Column(type: "nvarchar(max)", nullable: true), - Order = table.Column(type: "int", nullable: false), - Target = table.Column(type: "nvarchar(max)", nullable: true), - ElementId = table.Column(type: "nvarchar(max)", nullable: true), - CssClass = table.Column(type: "nvarchar(max)", nullable: true), - PageId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_CmsMenuItems", x => x.Id); - table.ForeignKey( - name: "FK_CmsMenuItems_CmsMenus_MenuId", - column: x => x.MenuId, - principalTable: "CmsMenus", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - migrationBuilder.CreateTable( name: "CmsBlogPosts", columns: table => new @@ -1026,11 +999,6 @@ namespace Volo.CmsKit.Migrations table: "CmsEntityTags", columns: new[] { "TenantId", "EntityId", "TagId" }); - migrationBuilder.CreateIndex( - name: "IX_CmsMenuItems_MenuId", - table: "CmsMenuItems", - column: "MenuId"); - migrationBuilder.CreateIndex( name: "IX_CmsPages_TenantId_Slug", table: "CmsPages", @@ -1174,9 +1142,6 @@ namespace Volo.CmsKit.Migrations migrationBuilder.DropTable( name: "CmsUsers"); - migrationBuilder.DropTable( - name: "CmsMenus"); - migrationBuilder.DropTable( name: "AbpAuditLogs"); } diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 7fa1014d5b..79738889d3 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -69,9 +69,7 @@ namespace Volo.CmsKit.Migrations .HasColumnName("CorrelationId"); b.Property("Exceptions") - .HasMaxLength(4000) - .HasColumnType("nvarchar(4000)") - .HasColumnName("Exceptions"); + .HasColumnType("nvarchar(max)"); b.Property("ExecutionDuration") .HasColumnType("int") @@ -1456,7 +1454,7 @@ namespace Volo.CmsKit.Migrations b.ToTable("CmsMediaDescriptors"); }); - modelBuilder.Entity("Volo.CmsKit.Menus.Menu", b => + modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => { b.Property("Id") .ValueGeneratedOnAdd() @@ -1476,61 +1474,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("CreatorId"); - b.Property("DeleterId") - .HasColumnType("uniqueidentifier") - .HasColumnName("DeleterId"); - - b.Property("DeletionTime") - .HasColumnType("datetime2") - .HasColumnName("DeletionTime"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsDeleted") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(false) - .HasColumnName("IsDeleted"); - - b.Property("IsMainMenu") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.ToTable("CmsMenus"); - }); - - modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - b.Property("CssClass") .HasColumnType("nvarchar(max)"); @@ -1542,6 +1485,10 @@ namespace Volo.CmsKit.Migrations b.Property("ElementId") .HasColumnType("nvarchar(max)"); + b.Property("ExtraProperties") + .HasColumnType("nvarchar(max)") + .HasColumnName("ExtraProperties"); + b.Property("Icon") .HasColumnType("nvarchar(max)"); @@ -1556,9 +1503,6 @@ namespace Volo.CmsKit.Migrations .HasColumnType("uniqueidentifier") .HasColumnName("LastModifierId"); - b.Property("MenuId") - .HasColumnType("uniqueidentifier"); - b.Property("Order") .HasColumnType("int"); @@ -1571,6 +1515,10 @@ namespace Volo.CmsKit.Migrations b.Property("Target") .HasColumnType("nvarchar(max)"); + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + b.Property("Url") .IsRequired() .HasMaxLength(1024) @@ -1578,8 +1526,6 @@ namespace Volo.CmsKit.Migrations b.HasKey("Id"); - b.HasIndex("MenuId"); - b.ToTable("CmsMenuItems"); }); @@ -2037,15 +1983,6 @@ namespace Volo.CmsKit.Migrations b.Navigation("Author"); }); - modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => - { - b.HasOne("Volo.CmsKit.Menus.Menu", null) - .WithMany("Items") - .HasForeignKey("MenuId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => { b.Navigation("Actions"); @@ -2085,11 +2022,6 @@ namespace Volo.CmsKit.Migrations { b.Navigation("ConnectionStrings"); }); - - modelBuilder.Entity("Volo.CmsKit.Menus.Menu", b => - { - b.Navigation("Items"); - }); #pragma warning restore 612, 618 } }