mirror of https://github.com/abpframework/abp.git
23 changed files with 613 additions and 9588 deletions
@ -1,904 +0,0 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Volo.Abp.EntityFrameworkCore; |
|||
using Volo.CmsKit.EntityFrameworkCore; |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
[DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))] |
|||
[Migration("20210609081519_Initial")] |
|||
partial class Initial |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("ProductVersion", "5.0.7") |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<Guid>("ContainerId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<byte[]>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("varbinary(max)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("ContainerId"); |
|||
|
|||
b.HasIndex("TenantId", "ContainerId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpBlobContainers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Blogs.Blog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("Slug") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("CmsBlogs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Blogs.BlogFeature", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("BlogId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("FeatureName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<bool>("IsEnabled") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("CmsBlogFeatures"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("AuthorId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid>("BlogId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid?>("CoverImageMediaId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("ShortDescription") |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Slug") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Title") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuthorId"); |
|||
|
|||
b.HasIndex("Slug", "BlogId"); |
|||
|
|||
b.ToTable("CmsBlogPosts"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Comments.Comment", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<Guid?>("RepliedCommentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Text") |
|||
.IsRequired() |
|||
.HasMaxLength(512) |
|||
.HasColumnType("nvarchar(512)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "RepliedCommentId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId"); |
|||
|
|||
b.ToTable("CmsComments"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.MediaDescriptors.MediaDescriptor", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("MimeType") |
|||
.IsRequired() |
|||
.HasMaxLength(128) |
|||
.HasColumnType("nvarchar(128)"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(255) |
|||
.HasColumnType("nvarchar(255)"); |
|||
|
|||
b.Property<long>("Size") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("bigint"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("CmsMediaDescriptors"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Menus.Menu", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("CmsMenus"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("CssClass") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("DisplayName") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ElementId") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Icon") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<bool>("IsActive") |
|||
.HasColumnType("bit"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<Guid>("MenuId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<int>("Order") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("PageId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("ParentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("RequiredPermissionName") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Target") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Url") |
|||
.IsRequired() |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("MenuId"); |
|||
|
|||
b.ToTable("CmsMenuItems"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Pages.Page", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("Content") |
|||
.HasMaxLength(2147483647) |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Script") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<string>("Slug") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.Property<string>("Style") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Title") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Slug"); |
|||
|
|||
b.ToTable("CmsPages"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Ratings.Rating", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<short>("StarCount") |
|||
.HasColumnType("smallint"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "CreatorId"); |
|||
|
|||
b.ToTable("CmsRatings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Reactions.UserReaction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ReactionName") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.HasIndex("TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName"); |
|||
|
|||
b.ToTable("CmsUserReactions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.EntityTag", b => |
|||
{ |
|||
b.Property<string>("EntityId") |
|||
.HasColumnType("nvarchar(450)"); |
|||
|
|||
b.Property<Guid>("TagId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("EntityId", "TagId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityId", "TagId"); |
|||
|
|||
b.ToTable("CmsEntityTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Tags.Tag", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("IsDeleted"); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnType("datetime2") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(32) |
|||
.HasColumnType("nvarchar(32)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Name"); |
|||
|
|||
b.ToTable("CmsTags"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Users.CmsUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasMaxLength(40) |
|||
.HasColumnType("nvarchar(40)") |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("Email") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("Email"); |
|||
|
|||
b.Property<bool>("EmailConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("EmailConfirmed"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Name"); |
|||
|
|||
b.Property<string>("PhoneNumber") |
|||
.HasMaxLength(16) |
|||
.HasColumnType("nvarchar(16)") |
|||
.HasColumnName("PhoneNumber"); |
|||
|
|||
b.Property<bool>("PhoneNumberConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnType("bit") |
|||
.HasDefaultValue(false) |
|||
.HasColumnName("PhoneNumberConfirmed"); |
|||
|
|||
b.Property<string>("Surname") |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)") |
|||
.HasColumnName("Surname"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasMaxLength(256) |
|||
.HasColumnType("nvarchar(256)") |
|||
.HasColumnName("UserName"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "Email"); |
|||
|
|||
b.HasIndex("TenantId", "UserName"); |
|||
|
|||
b.ToTable("CmsUsers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", null) |
|||
.WithMany() |
|||
.HasForeignKey("ContainerId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Blogs.BlogPost", b => |
|||
{ |
|||
b.HasOne("Volo.CmsKit.Users.CmsUser", "Author") |
|||
.WithMany() |
|||
.HasForeignKey("AuthorId") |
|||
.OnDelete(DeleteBehavior.Cascade) |
|||
.IsRequired(); |
|||
|
|||
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.CmsKit.Menus.Menu", b => |
|||
{ |
|||
b.Navigation("Items"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -1,456 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Volo.CmsKit.Migrations; |
|||
|
|||
public partial class Initial : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobContainers", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsBlogFeatures", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BlogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
FeatureName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
IsEnabled = table.Column<bool>(type: "bit", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogFeatures", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsBlogs", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsComments", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false), |
|||
RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsComments", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsEntityTags", |
|||
columns: table => new { |
|||
TagId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMediaDescriptors", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false), |
|||
MimeType = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Size = table.Column<long>(type: "bigint", maxLength: 2147483647, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsMediaDescriptors", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMenus", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsMenus", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsPages", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: true), |
|||
Script = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Style = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsPages", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsRatings", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
StarCount = table.Column<short>(type: "smallint", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsTags", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsTags", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUserReactions", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ReactionName = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUserReactions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUsers", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
|||
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobs", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ContainerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobs", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", |
|||
column: x => x.ContainerId, |
|||
principalTable: "AbpBlobContainers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMenuItems", |
|||
columns: table => new { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
MenuId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DisplayName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
IsActive = table.Column<bool>(type: "bit", nullable: false), |
|||
Url = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false), |
|||
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Order = table.Column<int>(type: "int", nullable: false), |
|||
Target = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ElementId = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
CssClass = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
RequiredPermissionName = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
PageId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(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 { |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BlogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Title = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
ShortDescription = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: true), |
|||
CoverImageMediaId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogPosts", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_CmsBlogPosts_CmsUsers_AuthorId", |
|||
column: x => x.AuthorId, |
|||
principalTable: "CmsUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobContainers_TenantId_Name", |
|||
table: "AbpBlobContainers", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_ContainerId", |
|||
table: "AbpBlobs", |
|||
column: "ContainerId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_TenantId_ContainerId_Name", |
|||
table: "AbpBlobs", |
|||
columns: new[] { "TenantId", "ContainerId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsBlogPosts_AuthorId", |
|||
table: "CmsBlogPosts", |
|||
column: "AuthorId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsBlogPosts_Slug_BlogId", |
|||
table: "CmsBlogPosts", |
|||
columns: new[] { "Slug", "BlogId" }); |
|||
|
|||
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_CmsEntityTags_TenantId_EntityId_TagId", |
|||
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", |
|||
columns: new[] { "TenantId", "Slug" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
|||
table: "CmsRatings", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsTags_TenantId_Name", |
|||
table: "CmsTags", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
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" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogFeatures"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogPosts"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsComments"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsEntityTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMediaDescriptors"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsPages"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsRatings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUserReactions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobContainers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMenus"); |
|||
} |
|||
} |
|||
@ -1,136 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class IsActiveonmodules : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_CmsMenuItems_CmsMenus_MenuId", |
|||
table: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMenus"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_CmsMenuItems_MenuId", |
|||
table: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "MenuId", |
|||
table: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "RequiredPermissionName", |
|||
table: "CmsMenuItems", |
|||
newName: "ExtraProperties"); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsActive", |
|||
table: "CmsUsers", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ConcurrencyStamp", |
|||
table: "CmsMenuItems", |
|||
type: "nvarchar(40)", |
|||
maxLength: 40, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "TenantId", |
|||
table: "CmsMenuItems", |
|||
type: "uniqueidentifier", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ConcurrencyStamp", |
|||
table: "CmsComments", |
|||
type: "nvarchar(40)", |
|||
maxLength: 40, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ExtraProperties", |
|||
table: "CmsComments", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "IsActive", |
|||
table: "CmsUsers"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ConcurrencyStamp", |
|||
table: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "TenantId", |
|||
table: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ConcurrencyStamp", |
|||
table: "CmsComments"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ExtraProperties", |
|||
table: "CmsComments"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "ExtraProperties", |
|||
table: "CmsMenuItems", |
|||
newName: "RequiredPermissionName"); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "MenuId", |
|||
table: "CmsMenuItems", |
|||
type: "uniqueidentifier", |
|||
nullable: false, |
|||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000")); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMenus", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsMenus", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsMenuItems_MenuId", |
|||
table: "CmsMenuItems", |
|||
column: "MenuId"); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_CmsMenuItems_CmsMenus_MenuId", |
|||
table: "CmsMenuItems", |
|||
column: "MenuId", |
|||
principalTable: "CmsMenus", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,466 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class Initial : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobContainers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobContainers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsBlogFeatures", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BlogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
FeatureName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
IsEnabled = table.Column<bool>(type: "bit", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogFeatures", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsBlogs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsComments", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false), |
|||
RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsComments", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsEntityTags", |
|||
columns: table => new |
|||
{ |
|||
TagId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(450)", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsEntityTags", x => new { x.EntityId, x.TagId }); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsGlobalResources", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsGlobalResources", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMediaDescriptors", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(255)", maxLength: 255, nullable: false), |
|||
MimeType = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
|||
Size = table.Column<long>(type: "bigint", maxLength: 2147483647, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsMediaDescriptors", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsMenuItems", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DisplayName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
IsActive = table.Column<bool>(type: "bit", nullable: false), |
|||
Url = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false), |
|||
Icon = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Order = table.Column<int>(type: "int", nullable: false), |
|||
Target = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ElementId = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
CssClass = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
PageId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsMenuItems", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsPages", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Title = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: true), |
|||
Script = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
Style = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsPages", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsRatings", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
StarCount = table.Column<short>(type: "smallint", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsTags", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsTags", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUserReactions", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
ReactionName = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUserReactions", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
IsActive = table.Column<bool>(type: "bit", nullable: false), |
|||
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
|||
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpBlobs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
ContainerId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
Content = table.Column<byte[]>(type: "varbinary(max)", maxLength: 2147483647, nullable: true), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpBlobs", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpBlobs_AbpBlobContainers_ContainerId", |
|||
column: x => x.ContainerId, |
|||
principalTable: "AbpBlobContainers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "CmsBlogPosts", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
BlogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Title = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
|||
Slug = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
|||
ShortDescription = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
Content = table.Column<string>(type: "nvarchar(max)", maxLength: 2147483647, nullable: true), |
|||
CoverImageMediaId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
AuthorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Status = table.Column<int>(type: "int", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
|||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_CmsBlogPosts", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_CmsBlogPosts_CmsUsers_AuthorId", |
|||
column: x => x.AuthorId, |
|||
principalTable: "CmsUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobContainers_TenantId_Name", |
|||
table: "AbpBlobContainers", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_ContainerId", |
|||
table: "AbpBlobs", |
|||
column: "ContainerId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpBlobs_TenantId_ContainerId_Name", |
|||
table: "AbpBlobs", |
|||
columns: new[] { "TenantId", "ContainerId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsBlogPosts_AuthorId", |
|||
table: "CmsBlogPosts", |
|||
column: "AuthorId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsBlogPosts_Slug_BlogId", |
|||
table: "CmsBlogPosts", |
|||
columns: new[] { "Slug", "BlogId" }); |
|||
|
|||
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_CmsEntityTags_TenantId_EntityId_TagId", |
|||
table: "CmsEntityTags", |
|||
columns: new[] { "TenantId", "EntityId", "TagId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsPages_TenantId_Slug", |
|||
table: "CmsPages", |
|||
columns: new[] { "TenantId", "Slug" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
|||
table: "CmsRatings", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsTags_TenantId_Name", |
|||
table: "CmsTags", |
|||
columns: new[] { "TenantId", "Name" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", |
|||
table: "CmsUserReactions", |
|||
columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); |
|||
|
|||
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" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogFeatures"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogPosts"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsBlogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsComments"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsEntityTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsGlobalResources"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMediaDescriptors"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsMenuItems"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsPages"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsRatings"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsTags"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUserReactions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpBlobContainers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "CmsUsers"); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,812 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class IsActiveonmodules : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiClaims"); |
|||
|
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name", |
|||
table: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiSecrets"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityClaims"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|||
table: "IdentityServerDeviceFlowCodes"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerClientProperties", |
|||
table: "IdentityServerClientProperties"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiScopes", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiScopeClaims", |
|||
table: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|||
table: "AbpSettings"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiClaims", |
|||
table: "IdentityServerApiClaims"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Properties", |
|||
table: "IdentityServerIdentityResources"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Name", |
|||
table: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Properties", |
|||
table: "IdentityServerApiResources"); |
|||
|
|||
migrationBuilder.RenameTable( |
|||
name: "IdentityServerApiClaims", |
|||
newName: "IdentityServerApiResourceClaims"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "ApiResourceId", |
|||
table: "IdentityServerApiScopes", |
|||
newName: "Id"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "ApiResourceId", |
|||
table: "IdentityServerApiScopeClaims", |
|||
newName: "ApiScopeId"); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "ConsumedTime", |
|||
table: "IdentityServerPersistedGrants", |
|||
type: "datetime2", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Description", |
|||
table: "IdentityServerPersistedGrants", |
|||
type: "nvarchar(200)", |
|||
maxLength: 200, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SessionId", |
|||
table: "IdentityServerPersistedGrants", |
|||
type: "nvarchar(100)", |
|||
maxLength: 100, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Description", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
type: "nvarchar(200)", |
|||
maxLength: 200, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "SessionId", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
type: "nvarchar(100)", |
|||
maxLength: 100, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "AllowedIdentityTokenSigningAlgorithms", |
|||
table: "IdentityServerClients", |
|||
type: "nvarchar(100)", |
|||
maxLength: 100, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "RequireRequestObject", |
|||
table: "IdentityServerClients", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ConcurrencyStamp", |
|||
table: "IdentityServerApiScopes", |
|||
type: "nvarchar(40)", |
|||
maxLength: 40, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "CreationTime", |
|||
table: "IdentityServerApiScopes", |
|||
type: "datetime2", |
|||
nullable: false, |
|||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "CreatorId", |
|||
table: "IdentityServerApiScopes", |
|||
type: "uniqueidentifier", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "DeleterId", |
|||
table: "IdentityServerApiScopes", |
|||
type: "uniqueidentifier", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "DeletionTime", |
|||
table: "IdentityServerApiScopes", |
|||
type: "datetime2", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "Enabled", |
|||
table: "IdentityServerApiScopes", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ExtraProperties", |
|||
table: "IdentityServerApiScopes", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsDeleted", |
|||
table: "IdentityServerApiScopes", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<DateTime>( |
|||
name: "LastModificationTime", |
|||
table: "IdentityServerApiScopes", |
|||
type: "datetime2", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<Guid>( |
|||
name: "LastModifierId", |
|||
table: "IdentityServerApiScopes", |
|||
type: "uniqueidentifier", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "AllowedAccessTokenSigningAlgorithms", |
|||
table: "IdentityServerApiResources", |
|||
type: "nvarchar(100)", |
|||
maxLength: 100, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "ShowInDiscoveryDocument", |
|||
table: "IdentityServerApiResources", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsActive", |
|||
table: "AbpUsers", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsExternal", |
|||
table: "AbpUsers", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "TenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Exceptions", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(4000)", |
|||
oldMaxLength: 4000, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ImpersonatorTenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ImpersonatorUserName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(256)", |
|||
maxLength: 256, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerClientProperties", |
|||
table: "IdentityServerClientProperties", |
|||
columns: new[] { "ClientId", "Key", "Value" }); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiScopes", |
|||
table: "IdentityServerApiScopes", |
|||
column: "Id"); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiScopeClaims", |
|||
table: "IdentityServerApiScopeClaims", |
|||
columns: new[] { "ApiScopeId", "Type" }); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiResourceClaims", |
|||
table: "IdentityServerApiResourceClaims", |
|||
columns: new[] { "ApiResourceId", "Type" }); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpLinkUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
SourceTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TargetTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpSecurityLogs", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
Identity = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
Action = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
|||
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
|||
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
|||
TenantName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
|||
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
|||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
|||
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiResourceProperties", |
|||
columns: table => new |
|||
{ |
|||
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiResourceScopes", |
|||
columns: table => new |
|||
{ |
|||
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Scope = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiResourceScopes", x => new { x.ApiResourceId, x.Scope }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiResourceScopes_IdentityServerApiResources_ApiResourceId", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiResourceSecrets", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false), |
|||
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true), |
|||
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiResourceSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiResourceSecrets_IdentityServerApiResources_ApiResourceId", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiScopeProperties", |
|||
columns: table => new |
|||
{ |
|||
ApiScopeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiScopeProperties", x => new { x.ApiScopeId, x.Key, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiScopeProperties_IdentityServerApiScopes_ApiScopeId", |
|||
column: x => x.ApiScopeId, |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerIdentityResourceClaims", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false), |
|||
IdentityResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerIdentityResourceClaims", x => new { x.IdentityResourceId, x.Type }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerIdentityResourceClaims_IdentityServerIdentityResources_IdentityResourceId", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerIdentityResourceProperties", |
|||
columns: table => new |
|||
{ |
|||
IdentityResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Key = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerIdentityResourceProperties", x => new { x.IdentityResourceId, x.Key, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerIdentityResourceProperties_IdentityServerIdentityResources_IdentityResourceId", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", |
|||
table: "IdentityServerPersistedGrants", |
|||
columns: new[] { "SubjectId", "SessionId", "Type" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
column: "UserCode"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|||
table: "AbpSettings", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }, |
|||
unique: true, |
|||
filter: "[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants", |
|||
columns: new[] { "TenantId", "Name", "ProviderName", "ProviderKey" }, |
|||
unique: true, |
|||
filter: "[TenantId] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", |
|||
table: "AbpLinkUsers", |
|||
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, |
|||
unique: true, |
|||
filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_Action", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "Action" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_ApplicationName", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "ApplicationName" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_Identity", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "Identity" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSecurityLogs_TenantId_UserId", |
|||
table: "AbpSecurityLogs", |
|||
columns: new[] { "TenantId", "UserId" }); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiResourceClaims", |
|||
column: "ApiResourceId", |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", |
|||
table: "IdentityServerApiScopeClaims", |
|||
column: "ApiScopeId", |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_IdentityServerApiResourceClaims_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiResourceClaims"); |
|||
|
|||
migrationBuilder.DropForeignKey( |
|||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId", |
|||
table: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpLinkUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSecurityLogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResourceProperties"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResourceScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResourceSecrets"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiScopeProperties"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityResourceClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityResourceProperties"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type", |
|||
table: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|||
table: "IdentityServerDeviceFlowCodes"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerClientProperties", |
|||
table: "IdentityServerClientProperties"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiScopes", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiScopeClaims", |
|||
table: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|||
table: "AbpSettings"); |
|||
|
|||
migrationBuilder.DropIndex( |
|||
name: "IX_AbpPermissionGrants_TenantId_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropPrimaryKey( |
|||
name: "PK_IdentityServerApiResourceClaims", |
|||
table: "IdentityServerApiResourceClaims"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ConsumedTime", |
|||
table: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Description", |
|||
table: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SessionId", |
|||
table: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Description", |
|||
table: "IdentityServerDeviceFlowCodes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "SessionId", |
|||
table: "IdentityServerDeviceFlowCodes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "AllowedIdentityTokenSigningAlgorithms", |
|||
table: "IdentityServerClients"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "RequireRequestObject", |
|||
table: "IdentityServerClients"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ConcurrencyStamp", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CreationTime", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "CreatorId", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeleterId", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "DeletionTime", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "Enabled", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ExtraProperties", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsDeleted", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "LastModificationTime", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "LastModifierId", |
|||
table: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "AllowedAccessTokenSigningAlgorithms", |
|||
table: "IdentityServerApiResources"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ShowInDiscoveryDocument", |
|||
table: "IdentityServerApiResources"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsActive", |
|||
table: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "IsExternal", |
|||
table: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ImpersonatorTenantName", |
|||
table: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ImpersonatorUserName", |
|||
table: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.RenameTable( |
|||
name: "IdentityServerApiResourceClaims", |
|||
newName: "IdentityServerApiClaims"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "Id", |
|||
table: "IdentityServerApiScopes", |
|||
newName: "ApiResourceId"); |
|||
|
|||
migrationBuilder.RenameColumn( |
|||
name: "ApiScopeId", |
|||
table: "IdentityServerApiScopeClaims", |
|||
newName: "ApiResourceId"); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Properties", |
|||
table: "IdentityServerIdentityResources", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Name", |
|||
table: "IdentityServerApiScopeClaims", |
|||
type: "nvarchar(200)", |
|||
maxLength: 200, |
|||
nullable: false, |
|||
defaultValue: ""); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "Properties", |
|||
table: "IdentityServerApiResources", |
|||
type: "nvarchar(max)", |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "TenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(64)", |
|||
oldMaxLength: 64, |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Exceptions", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(4000)", |
|||
maxLength: 4000, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerClientProperties", |
|||
table: "IdentityServerClientProperties", |
|||
columns: new[] { "ClientId", "Key" }); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiScopes", |
|||
table: "IdentityServerApiScopes", |
|||
columns: new[] { "ApiResourceId", "Name" }); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiScopeClaims", |
|||
table: "IdentityServerApiScopeClaims", |
|||
columns: new[] { "ApiResourceId", "Name", "Type" }); |
|||
|
|||
migrationBuilder.AddPrimaryKey( |
|||
name: "PK_IdentityServerApiClaims", |
|||
table: "IdentityServerApiClaims", |
|||
columns: new[] { "ApiResourceId", "Type" }); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiSecrets", |
|||
columns: table => new |
|||
{ |
|||
ApiResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Type = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: false), |
|||
Description = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
|||
Expiration = table.Column<DateTime>(type: "datetime2", nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResourceId", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerIdentityClaims", |
|||
columns: table => new |
|||
{ |
|||
IdentityResourceId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
|||
Type = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources_IdentityResourceId", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
column: "UserCode", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|||
table: "AbpSettings", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|||
table: "AbpPermissionGrants", |
|||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiClaims", |
|||
column: "ApiResourceId", |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name", |
|||
table: "IdentityServerApiScopeClaims", |
|||
columns: new[] { "ApiResourceId", "Name" }, |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|||
onDelete: ReferentialAction.Cascade); |
|||
|
|||
migrationBuilder.AddForeignKey( |
|||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId", |
|||
table: "IdentityServerApiScopes", |
|||
column: "ApiResourceId", |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -1,68 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class IsActiveonmodules : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<bool>( |
|||
name: "IsActive", |
|||
table: "CmsUsers", |
|||
type: "bit", |
|||
nullable: false, |
|||
defaultValue: false); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "TenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(max)", |
|||
oldNullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ImpersonatorTenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(64)", |
|||
maxLength: 64, |
|||
nullable: true); |
|||
|
|||
migrationBuilder.AddColumn<string>( |
|||
name: "ImpersonatorUserName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(256)", |
|||
maxLength: 256, |
|||
nullable: true); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "IsActive", |
|||
table: "CmsUsers"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ImpersonatorTenantName", |
|||
table: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.DropColumn( |
|||
name: "ImpersonatorUserName", |
|||
table: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "TenantName", |
|||
table: "AbpAuditLogs", |
|||
type: "nvarchar(max)", |
|||
nullable: true, |
|||
oldClrType: typeof(string), |
|||
oldType: "nvarchar(64)", |
|||
oldMaxLength: 64, |
|||
oldNullable: true); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -1,26 +0,0 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
public partial class Added_BlogPostStatus : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<int>( |
|||
name: "Status", |
|||
table: "CmsBlogPosts", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "Status", |
|||
table: "CmsBlogPosts"); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue