Browse Source

Updated CmsKitService for v6.0

pull/130/head
Galip Tolga Erdem 4 years ago
parent
commit
e46d385d5a
  1. 3
      services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs
  2. 30
      services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20221006075206_Abp_6_0_Update.Designer.cs
  3. 108
      services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20221006075206_Abp_6_0_Update.cs
  4. 160
      services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs

3
services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/EntityFrameworkCore/CmskitServiceDbContext.cs

@ -4,6 +4,7 @@ using Volo.Abp.EntityFrameworkCore;
using Volo.CmsKit.Blogs;
using Volo.CmsKit.Comments;
using Volo.CmsKit.EntityFrameworkCore;
using Volo.CmsKit.GlobalResources;
using Volo.CmsKit.MediaDescriptors;
using Volo.CmsKit.Menus;
using Volo.CmsKit.Pages;
@ -40,10 +41,12 @@ public class CmskitServiceDbContext : AbpDbContext<CmskitServiceDbContext>, ICms
public DbSet<Blog> Blogs { get; set; }
public DbSet<BlogPost> BlogPosts { get; set; }
public DbSet<BlogFeature> BlogFeatures { get; set; }
public DbSet<MediaDescriptor> MediaDescriptors { get; set; }
public DbSet<MenuItem> MenuItems { get; set; }
public DbSet<GlobalResource> GlobalResources { get; set; }
protected override void OnModelCreating(ModelBuilder modelBuilder)
{

30
services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20221006075206_Abp_6_0_Update.Designer.cs

@ -0,0 +1,30 @@
// <auto-generated />
using EShopOnAbp.CmskitService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace EShopOnAbp.CmskitService.Migrations
{
[DbContext(typeof(CmskitServiceDbContext))]
[Migration("20221006075206_Abp_6_0_Update")]
partial class Abp_6_0_Update
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
#pragma warning restore 612, 618
}
}
}

108
services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/20221006075206_Abp_6_0_Update.cs

@ -0,0 +1,108 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EShopOnAbp.CmskitService.Migrations
{
public partial class Abp_6_0_Update : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "CmsComments");
migrationBuilder.DropTable(
name: "CmsRatings");
migrationBuilder.DropTable(
name: "CmsUsers");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "CmsComments",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: false),
EntityId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
EntityType = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
RepliedCommentId = table.Column<Guid>(type: "uuid", nullable: true),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
Text = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CmsComments", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CmsRatings",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
CreationTime = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
CreatorId = table.Column<Guid>(type: "uuid", nullable: false),
EntityId = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
EntityType = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: false),
StarCount = table.Column<short>(type: "smallint", nullable: false),
TenantId = table.Column<Guid>(type: "uuid", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_CmsRatings", x => x.Id);
});
migrationBuilder.CreateTable(
name: "CmsUsers",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
ConcurrencyStamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
Email = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false),
EmailConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
ExtraProperties = table.Column<string>(type: "text", nullable: true),
Name = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
PhoneNumber = table.Column<string>(type: "character varying(16)", maxLength: 16, nullable: true),
PhoneNumberConfirmed = table.Column<bool>(type: "boolean", nullable: false, defaultValue: false),
Surname = table.Column<string>(type: "character varying(64)", maxLength: 64, nullable: true),
TenantId = table.Column<Guid>(type: "uuid", nullable: true),
UserName = table.Column<string>(type: "character varying(256)", maxLength: 256, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CmsUsers", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_CmsComments_TenantId_EntityType_EntityId",
table: "CmsComments",
columns: new[] { "TenantId", "EntityType", "EntityId" });
migrationBuilder.CreateIndex(
name: "IX_CmsComments_TenantId_RepliedCommentId",
table: "CmsComments",
columns: new[] { "TenantId", "RepliedCommentId" });
migrationBuilder.CreateIndex(
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId",
table: "CmsRatings",
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" });
migrationBuilder.CreateIndex(
name: "IX_CmsUsers_TenantId_Email",
table: "CmsUsers",
columns: new[] { "TenantId", "Email" });
migrationBuilder.CreateIndex(
name: "IX_CmsUsers_TenantId_UserName",
table: "CmsUsers",
columns: new[] { "TenantId", "UserName" });
}
}
}

160
services/cmskit/src/EShopOnAbp.CmskitService.EntityFrameworkCore/Migrations/CmskitServiceDbContextModelSnapshot.cs

@ -1,5 +1,4 @@
// <auto-generated />
using System;
using EShopOnAbp.CmskitService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
@ -19,167 +18,10 @@ namespace EShopOnAbp.CmskitService.Migrations
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.PostgreSql)
.HasAnnotation("ProductVersion", "6.0.1")
.HasAnnotation("ProductVersion", "6.0.5")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("EntityType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("ExtraProperties")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("RepliedCommentId")
.HasColumnType("uuid");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("Text")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.HasKey("Id");
b.HasIndex("TenantId", "RepliedCommentId");
b.HasIndex("TenantId", "EntityType", "EntityId");
b.ToTable("CmsComments", (string)null);
});
modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("CreationTime");
b.Property<Guid>("CreatorId")
.HasColumnType("uuid")
.HasColumnName("CreatorId");
b.Property<string>("EntityId")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<string>("EntityType")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character varying(64)");
b.Property<short>("StarCount")
.HasColumnType("smallint");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId");
b.ToTable("CmsRatings", (string)null);
});
modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<string>("Email")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("Email");
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("EmailConfirmed");
b.Property<string>("ExtraProperties")
.HasColumnType("text")
.HasColumnName("ExtraProperties");
b.Property<string>("Name")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasColumnName("Name");
b.Property<string>("PhoneNumber")
.HasMaxLength(16)
.HasColumnType("character varying(16)")
.HasColumnName("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnType("boolean")
.HasDefaultValue(false)
.HasColumnName("PhoneNumberConfirmed");
b.Property<string>("Surname")
.HasMaxLength(64)
.HasColumnType("character varying(64)")
.HasColumnName("Surname");
b.Property<Guid?>("TenantId")
.HasColumnType("uuid")
.HasColumnName("TenantId");
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)")
.HasColumnName("UserName");
b.HasKey("Id");
b.HasIndex("TenantId", "Email");
b.HasIndex("TenantId", "UserName");
b.ToTable("CmsUsers", (string)null);
});
#pragma warning restore 612, 618
}
}

Loading…
Cancel
Save