Re-create database migrations.

pull/1148/head
Halil ibrahim Kalkan 6 years ago
parent 5b8aba1b82
commit 1716fb3b0d

@ -1,786 +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 MyCompanyName.MyProjectName.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20190515120718_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ApplicationName")
.HasColumnName("ApplicationName")
.HasMaxLength(96);
b.Property<string>("BrowserInfo")
.HasColumnName("BrowserInfo")
.HasMaxLength(512);
b.Property<string>("ClientId")
.HasColumnName("ClientId")
.HasMaxLength(64);
b.Property<string>("ClientIpAddress")
.HasColumnName("ClientIpAddress")
.HasMaxLength(64);
b.Property<string>("ClientName")
.HasColumnName("ClientName")
.HasMaxLength(128);
b.Property<string>("Comments")
.HasColumnName("Comments")
.HasMaxLength(256);
b.Property<string>("ConcurrencyStamp");
b.Property<string>("CorrelationId")
.HasColumnName("CorrelationId")
.HasMaxLength(64);
b.Property<string>("Exceptions")
.HasColumnName("Exceptions")
.HasMaxLength(4000);
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("HttpMethod")
.HasColumnName("HttpMethod")
.HasMaxLength(16);
b.Property<int?>("HttpStatusCode")
.HasColumnName("HttpStatusCode");
b.Property<Guid?>("ImpersonatorTenantId")
.HasColumnName("ImpersonatorTenantId");
b.Property<Guid?>("ImpersonatorUserId")
.HasColumnName("ImpersonatorUserId");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<string>("TenantName");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256);
b.Property<Guid?>("UserId")
.HasColumnName("UserId");
b.Property<string>("UserName")
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("TenantId", "ExecutionTime");
b.HasIndex("TenantId", "UserId", "ExecutionTime");
b.ToTable("AbpAuditLogs");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<int>("ExecutionDuration")
.HasColumnName("ExecutionDuration");
b.Property<DateTime>("ExecutionTime")
.HasColumnName("ExecutionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<string>("MethodName")
.HasColumnName("MethodName")
.HasMaxLength(128);
b.Property<string>("Parameters")
.HasColumnName("Parameters")
.HasMaxLength(2000);
b.Property<string>("ServiceName")
.HasColumnName("ServiceName")
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
b.ToTable("AbpAuditLogActions");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("AuditLogId")
.HasColumnName("AuditLogId");
b.Property<DateTime>("ChangeTime")
.HasColumnName("ChangeTime");
b.Property<byte>("ChangeType")
.HasColumnName("ChangeType");
b.Property<string>("EntityId")
.IsRequired()
.HasColumnName("EntityId")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
.HasMaxLength(128);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.HasKey("Id");
b.HasIndex("AuditLogId");
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
b.ToTable("AbpEntityChanges");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("EntityChangeId");
b.Property<string>("NewValue")
.HasColumnName("NewValue")
.HasMaxLength(512);
b.Property<string>("OriginalValue")
.HasColumnName("OriginalValue")
.HasMaxLength(512);
b.Property<string>("PropertyName")
.IsRequired()
.HasColumnName("PropertyName")
.HasMaxLength(128);
b.Property<string>("PropertyTypeFullName")
.IsRequired()
.HasColumnName("PropertyTypeFullName")
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("EntityChangeId");
b.ToTable("AbpEntityPropertyChanges");
});
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(128);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpFeatureValues");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Regex")
.HasMaxLength(512);
b.Property<string>("RegexDescription")
.HasMaxLength(128);
b.Property<bool>("Required");
b.Property<int>("ValueType");
b.HasKey("Id");
b.ToTable("AbpClaimTypes");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDefault")
.HasColumnName("IsDefault");
b.Property<bool>("IsPublic")
.HasColumnName("IsPublic");
b.Property<bool>("IsStatic")
.HasColumnName("IsStatic");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("AbpRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AbpRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasColumnName("AccessFailedCount")
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Email")
.HasColumnName("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("EmailConfirmed")
.HasDefaultValue(false);
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("Name")
.HasColumnName("Name")
.HasMaxLength(64);
b.Property<string>("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasColumnName("NormalizedUserName")
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasColumnName("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasColumnName("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasColumnName("PhoneNumberConfirmed")
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
b.Property<string>("Surname")
.HasColumnName("Surname")
.HasMaxLength(64);
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("TwoFactorEnabled")
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasColumnName("UserName")
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("Email");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.HasIndex("UserName");
b.ToTable("AbpUsers");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("ClaimValue")
.HasMaxLength(1024);
b.Property<Guid?>("TenantId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AbpUserClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(196);
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("AbpUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid?>("TenantId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("AbpUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(64);
b.Property<string>("Name")
.HasMaxLength(128);
b.Property<Guid?>("TenantId");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AbpUserTokens");
});
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderName")
.IsRequired()
.HasMaxLength(64);
b.Property<Guid?>("TenantId");
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpPermissionGrants");
});
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(128);
b.Property<string>("ProviderKey")
.HasMaxLength(64);
b.Property<string>("ProviderName")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2048);
b.HasKey("Id");
b.HasIndex("Name", "ProviderName", "ProviderKey");
b.ToTable("AbpSettings");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64);
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpTenants");
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId");
b.Property<string>("Name")
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(1024);
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings");
});
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("Actions")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.AuditLog")
.WithMany("EntityChanges")
.HasForeignKey("AuditLogId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
{
b.HasOne("Volo.Abp.AuditLogging.EntityChange")
.WithMany("PropertyChanges")
.HasForeignKey("EntityChangeId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole")
.WithMany()
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser")
.WithMany("Tokens")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant")
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}

@ -1,470 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace MyCompanyName.MyProjectName.Migrations
{
public partial class Added_IdentityServer_Module : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "IdentityServerApiResources",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(maxLength: 200, nullable: false),
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerClients",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
ClientName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
ClientUri = table.Column<string>(maxLength: 300, nullable: true),
LogoUri = table.Column<string>(maxLength: 300, nullable: true),
Enabled = table.Column<bool>(nullable: false),
ProtocolType = table.Column<string>(maxLength: 200, nullable: false),
RequireClientSecret = table.Column<bool>(nullable: false),
RequireConsent = table.Column<bool>(nullable: false),
AllowRememberConsent = table.Column<bool>(nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false),
RequirePkce = table.Column<bool>(nullable: false),
AllowPlainTextPkce = table.Column<bool>(nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false),
FrontChannelLogoutUri = table.Column<string>(maxLength: 300, nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
BackChannelLogoutUri = table.Column<string>(maxLength: 300, nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
AllowOfflineAccess = table.Column<bool>(nullable: false),
IdentityTokenLifetime = table.Column<int>(nullable: false),
AccessTokenLifetime = table.Column<int>(nullable: false),
AuthorizationCodeLifetime = table.Column<int>(nullable: false),
ConsentLifetime = table.Column<int>(nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false),
RefreshTokenUsage = table.Column<int>(nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false),
RefreshTokenExpiration = table.Column<int>(nullable: false),
AccessTokenType = table.Column<int>(nullable: false),
EnableLocalLogin = table.Column<bool>(nullable: false),
IncludeJwtId = table.Column<bool>(nullable: false),
AlwaysSendClientClaims = table.Column<bool>(nullable: false),
ClientClaimsPrefix = table.Column<string>(maxLength: 200, nullable: true),
PairWiseSubjectSalt = table.Column<string>(maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerIdentityResources",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(maxLength: 200, nullable: false),
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false),
Required = table.Column<bool>(nullable: false),
Emphasize = table.Column<bool>(nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerPersistedGrants",
columns: table => new
{
Key = table.Column<string>(maxLength: 200, nullable: false),
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
Type = table.Column<string>(maxLength: 50, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
CreationTime = table.Column<DateTime>(nullable: false),
Expiration = table.Column<DateTime>(nullable: true),
Data = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopes",
columns: table => new
{
ApiResourceId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 196, nullable: false),
DisplayName = table.Column<string>(maxLength: 128, nullable: true),
Description = table.Column<string>(maxLength: 256, nullable: true),
Required = table.Column<bool>(nullable: false),
Emphasize = table.Column<bool>(nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name });
table.ForeignKey(
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiSecrets",
columns: table => new
{
Type = table.Column<string>(maxLength: 32, nullable: false),
Value = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 256, nullable: true),
Expiration = table.Column<DateTime>(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: "IdentityServerClientClaims",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 250, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientCorsOrigins",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Origin = table.Column<string>(maxLength: 150, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin });
table.ForeignKey(
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientGrantTypes",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
GrantType = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType });
table.ForeignKey(
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientIdPRestrictions",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Provider = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider });
table.ForeignKey(
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientPostLogoutRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
PostLogoutRedirectUri = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientProperties",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Key = table.Column<string>(maxLength: 64, nullable: false),
Value = table.Column<string>(maxLength: 128, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key });
table.ForeignKey(
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
RedirectUri = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientScopes",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Scope = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope });
table.ForeignKey(
name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientSecrets",
columns: table => new
{
Type = table.Column<string>(maxLength: 32, nullable: false),
Value = table.Column<string>(maxLength: 196, nullable: false),
ClientId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 256, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerIdentityClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
IdentityResourceId = table.Column<Guid>(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.CreateTable(
name: "IdentityServerApiScopeClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name",
columns: x => new { x.ApiResourceId, x.Name },
principalTable: "IdentityServerApiScopes",
principalColumns: new[] { "ApiResourceId", "Name" },
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients",
column: "ClientId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type",
table: "IdentityServerPersistedGrants",
columns: new[] { "SubjectId", "ClientId", "Type" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "IdentityServerApiClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiScopeClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiSecrets");
migrationBuilder.DropTable(
name: "IdentityServerClientClaims");
migrationBuilder.DropTable(
name: "IdentityServerClientCorsOrigins");
migrationBuilder.DropTable(
name: "IdentityServerClientGrantTypes");
migrationBuilder.DropTable(
name: "IdentityServerClientIdPRestrictions");
migrationBuilder.DropTable(
name: "IdentityServerClientPostLogoutRedirectUris");
migrationBuilder.DropTable(
name: "IdentityServerClientProperties");
migrationBuilder.DropTable(
name: "IdentityServerClientRedirectUris");
migrationBuilder.DropTable(
name: "IdentityServerClientScopes");
migrationBuilder.DropTable(
name: "IdentityServerClientSecrets");
migrationBuilder.DropTable(
name: "IdentityServerIdentityClaims");
migrationBuilder.DropTable(
name: "IdentityServerPersistedGrants");
migrationBuilder.DropTable(
name: "IdentityServerApiScopes");
migrationBuilder.DropTable(
name: "IdentityServerClients");
migrationBuilder.DropTable(
name: "IdentityServerIdentityResources");
migrationBuilder.DropTable(
name: "IdentityServerApiResources");
}
}
}

@ -10,8 +10,8 @@ using MyCompanyName.MyProjectName.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20190521155035_Added_IdentityServer_Module")]
partial class Added_IdentityServer_Module
[Migration("20190523122033_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{

@ -201,6 +201,131 @@ namespace MyCompanyName.MyProjectName.Migrations
table.PrimaryKey("PK_AbpUsers", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiResources",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(maxLength: 200, nullable: false),
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerClients",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
ClientName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
ClientUri = table.Column<string>(maxLength: 300, nullable: true),
LogoUri = table.Column<string>(maxLength: 300, nullable: true),
Enabled = table.Column<bool>(nullable: false),
ProtocolType = table.Column<string>(maxLength: 200, nullable: false),
RequireClientSecret = table.Column<bool>(nullable: false),
RequireConsent = table.Column<bool>(nullable: false),
AllowRememberConsent = table.Column<bool>(nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false),
RequirePkce = table.Column<bool>(nullable: false),
AllowPlainTextPkce = table.Column<bool>(nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false),
FrontChannelLogoutUri = table.Column<string>(maxLength: 300, nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
BackChannelLogoutUri = table.Column<string>(maxLength: 300, nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false),
AllowOfflineAccess = table.Column<bool>(nullable: false),
IdentityTokenLifetime = table.Column<int>(nullable: false),
AccessTokenLifetime = table.Column<int>(nullable: false),
AuthorizationCodeLifetime = table.Column<int>(nullable: false),
ConsentLifetime = table.Column<int>(nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false),
RefreshTokenUsage = table.Column<int>(nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false),
RefreshTokenExpiration = table.Column<int>(nullable: false),
AccessTokenType = table.Column<int>(nullable: false),
EnableLocalLogin = table.Column<bool>(nullable: false),
IncludeJwtId = table.Column<bool>(nullable: false),
AlwaysSendClientClaims = table.Column<bool>(nullable: false),
ClientClaimsPrefix = table.Column<string>(maxLength: 200, nullable: true),
PairWiseSubjectSalt = table.Column<string>(maxLength: 200, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerIdentityResources",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
CreatorId = table.Column<Guid>(nullable: true),
LastModificationTime = table.Column<DateTime>(nullable: true),
LastModifierId = table.Column<Guid>(nullable: true),
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(nullable: true),
DeletionTime = table.Column<DateTime>(nullable: true),
Name = table.Column<string>(maxLength: 200, nullable: false),
DisplayName = table.Column<string>(maxLength: 200, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false),
Required = table.Column<bool>(nullable: false),
Emphasize = table.Column<bool>(nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityServerPersistedGrants",
columns: table => new
{
Key = table.Column<string>(maxLength: 200, nullable: false),
Id = table.Column<Guid>(nullable: false),
ExtraProperties = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true),
Type = table.Column<string>(maxLength: 50, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
CreationTime = table.Column<DateTime>(nullable: false),
Expiration = table.Column<DateTime>(nullable: true),
Data = table.Column<string>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key);
});
migrationBuilder.CreateTable(
name: "AbpAuditLogActions",
columns: table => new
@ -379,6 +504,253 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopes",
columns: table => new
{
ApiResourceId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 196, nullable: false),
DisplayName = table.Column<string>(maxLength: 128, nullable: true),
Description = table.Column<string>(maxLength: 256, nullable: true),
Required = table.Column<bool>(nullable: false),
Emphasize = table.Column<bool>(nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name });
table.ForeignKey(
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiSecrets",
columns: table => new
{
Type = table.Column<string>(maxLength: 32, nullable: false),
Value = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 256, nullable: true),
Expiration = table.Column<DateTime>(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: "IdentityServerClientClaims",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 250, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientCorsOrigins",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Origin = table.Column<string>(maxLength: 150, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin });
table.ForeignKey(
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientGrantTypes",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
GrantType = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType });
table.ForeignKey(
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientIdPRestrictions",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Provider = table.Column<string>(maxLength: 64, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider });
table.ForeignKey(
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientPostLogoutRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
PostLogoutRedirectUri = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientProperties",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Key = table.Column<string>(maxLength: 64, nullable: false),
Value = table.Column<string>(maxLength: 128, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientProperties", x => new { x.ClientId, x.Key });
table.ForeignKey(
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientRedirectUris",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
RedirectUri = table.Column<string>(maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri });
table.ForeignKey(
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientScopes",
columns: table => new
{
ClientId = table.Column<Guid>(nullable: false),
Scope = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope });
table.ForeignKey(
name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerClientSecrets",
columns: table => new
{
Type = table.Column<string>(maxLength: 32, nullable: false),
Value = table.Column<string>(maxLength: 196, nullable: false),
ClientId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 256, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value });
table.ForeignKey(
name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId",
column: x => x.ClientId,
principalTable: "IdentityServerClients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerIdentityClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
IdentityResourceId = table.Column<Guid>(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.CreateTable(
name: "AbpEntityPropertyChanges",
columns: table => new
@ -402,6 +774,25 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiScopeClaims",
columns: table => new
{
Type = table.Column<string>(maxLength: 196, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 196, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiResourceId_Name",
columns: x => new { x.ApiResourceId, x.Name },
principalTable: "IdentityServerApiScopes",
principalColumns: new[] { "ApiResourceId", "Name" },
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpAuditLogActions_AuditLogId",
table: "AbpAuditLogActions",
@ -507,6 +898,17 @@ namespace MyCompanyName.MyProjectName.Migrations
name: "IX_AbpUsers_UserName",
table: "AbpUsers",
column: "UserName");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerClients_ClientId",
table: "IdentityServerClients",
column: "ClientId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type",
table: "IdentityServerPersistedGrants",
columns: new[] { "SubjectId", "ClientId", "Type" });
}
protected override void Down(MigrationBuilder migrationBuilder)
@ -550,6 +952,48 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable(
name: "AbpUserTokens");
migrationBuilder.DropTable(
name: "IdentityServerApiClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiScopeClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiSecrets");
migrationBuilder.DropTable(
name: "IdentityServerClientClaims");
migrationBuilder.DropTable(
name: "IdentityServerClientCorsOrigins");
migrationBuilder.DropTable(
name: "IdentityServerClientGrantTypes");
migrationBuilder.DropTable(
name: "IdentityServerClientIdPRestrictions");
migrationBuilder.DropTable(
name: "IdentityServerClientPostLogoutRedirectUris");
migrationBuilder.DropTable(
name: "IdentityServerClientProperties");
migrationBuilder.DropTable(
name: "IdentityServerClientRedirectUris");
migrationBuilder.DropTable(
name: "IdentityServerClientScopes");
migrationBuilder.DropTable(
name: "IdentityServerClientSecrets");
migrationBuilder.DropTable(
name: "IdentityServerIdentityClaims");
migrationBuilder.DropTable(
name: "IdentityServerPersistedGrants");
migrationBuilder.DropTable(
name: "AbpEntityChanges");
@ -562,8 +1006,20 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable(
name: "AbpUsers");
migrationBuilder.DropTable(
name: "IdentityServerApiScopes");
migrationBuilder.DropTable(
name: "IdentityServerClients");
migrationBuilder.DropTable(
name: "IdentityServerIdentityResources");
migrationBuilder.DropTable(
name: "AbpAuditLogs");
migrationBuilder.DropTable(
name: "IdentityServerApiResources");
}
}
}
Loading…
Cancel
Save