mirror of https://github.com/abpframework/abp.git
9 changed files with 7123 additions and 606 deletions
@ -0,0 +1,854 @@ |
|||
// <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; |
|||
|
|||
#nullable disable |
|||
|
|||
namespace Volo.CmsKit.Migrations |
|||
{ |
|||
[DbContext(typeof(CmsKitHttpApiHostMigrationsDbContext))] |
|||
[Migration("20220123012800_IsActive-on-modules")] |
|||
partial class IsActiveonmodules |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) |
|||
.HasAnnotation("ProductVersion", "6.0.0") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128); |
|||
|
|||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Comments.Comment", 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<string>("EntityId") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("EntityType") |
|||
.IsRequired() |
|||
.HasMaxLength(64) |
|||
.HasColumnType("nvarchar(64)"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.CmsKit.Menus.MenuItem", 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<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>("ExtraProperties") |
|||
.HasColumnType("nvarchar(max)") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
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<int>("Order") |
|||
.HasColumnType("int"); |
|||
|
|||
b.Property<Guid?>("PageId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<Guid?>("ParentId") |
|||
.HasColumnType("uniqueidentifier"); |
|||
|
|||
b.Property<string>("Target") |
|||
.HasColumnType("nvarchar(max)"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnType("uniqueidentifier") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("Url") |
|||
.IsRequired() |
|||
.HasMaxLength(1024) |
|||
.HasColumnType("nvarchar(1024)"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("CmsMenuItems", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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<bool>("IsActive") |
|||
.HasColumnType("bit"); |
|||
|
|||
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", (string)null); |
|||
}); |
|||
|
|||
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"); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,136 @@ |
|||
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); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,812 @@ |
|||
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
File diff suppressed because it is too large
@ -0,0 +1,68 @@ |
|||
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); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue