diff --git a/templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.Designer.cs b/templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.Designer.cs
deleted file mode 100644
index 6b85820f8a..0000000000
--- a/templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.Designer.cs
+++ /dev/null
@@ -1,526 +0,0 @@
-//
-using System;
-using IdentityServerHost;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-
-namespace IdentityServerHost.Migrations
-{
- [DbContext(typeof(DemoAppDbContext))]
- [Migration("20181031075019_Initial")]
- partial class Initial
- {
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("ProductVersion", "2.1.1-rtm-30846")
- .HasAnnotation("Relational:MaxIdentifierLength", 128)
- .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
-
- b.Property("Description")
- .HasMaxLength(1000);
-
- b.Property("DisplayName")
- .HasMaxLength(200);
-
- b.Property("Enabled");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200);
-
- b.HasKey("Id");
-
- b.ToTable("IdentityServerApiResources");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
- {
- b.Property("ApiResourceId");
-
- b.Property("Type")
- .HasMaxLength(196);
-
- b.HasKey("ApiResourceId", "Type");
-
- b.ToTable("IdentityServerApiClaims");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
- {
- b.Property("ApiResourceId");
-
- b.Property("Name")
- .HasMaxLength(196);
-
- b.Property("Description")
- .HasMaxLength(256);
-
- b.Property("DisplayName")
- .HasMaxLength(128);
-
- b.Property("Emphasize");
-
- b.Property("Required");
-
- b.Property("ShowInDiscoveryDocument");
-
- b.HasKey("ApiResourceId", "Name");
-
- b.ToTable("IdentityServerApiScopes");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
- {
- b.Property("ApiResourceId");
-
- b.Property("Name")
- .HasMaxLength(196);
-
- b.Property("Type")
- .HasMaxLength(196);
-
- b.HasKey("ApiResourceId", "Name", "Type");
-
- b.ToTable("IdentityServerApiScopeClaims");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
- {
- b.Property("ApiResourceId");
-
- b.Property("Type")
- .HasMaxLength(32);
-
- b.Property("Value")
- .HasMaxLength(196);
-
- b.Property("Description")
- .HasMaxLength(256);
-
- b.Property("Expiration");
-
- b.HasKey("ApiResourceId", "Type", "Value");
-
- b.ToTable("IdentityServerApiSecrets");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
-
- b.Property("AbsoluteRefreshTokenLifetime");
-
- b.Property("AccessTokenLifetime");
-
- b.Property("AccessTokenType");
-
- b.Property("AllowAccessTokensViaBrowser");
-
- b.Property("AllowOfflineAccess");
-
- b.Property("AllowPlainTextPkce");
-
- b.Property("AllowRememberConsent");
-
- b.Property("AlwaysIncludeUserClaimsInIdToken");
-
- b.Property("AlwaysSendClientClaims");
-
- b.Property("AuthorizationCodeLifetime");
-
- b.Property("BackChannelLogoutSessionRequired");
-
- b.Property("BackChannelLogoutUri")
- .HasMaxLength(2000);
-
- b.Property("ClientClaimsPrefix")
- .HasMaxLength(200);
-
- b.Property("ClientId")
- .IsRequired()
- .HasMaxLength(200);
-
- b.Property("ClientName")
- .HasMaxLength(200);
-
- b.Property("ClientUri")
- .HasMaxLength(2000);
-
- b.Property("ConsentLifetime");
-
- b.Property("Description")
- .HasMaxLength(1000);
-
- b.Property("EnableLocalLogin");
-
- b.Property("Enabled");
-
- b.Property("FrontChannelLogoutSessionRequired");
-
- b.Property("FrontChannelLogoutUri")
- .HasMaxLength(2000);
-
- b.Property("IdentityTokenLifetime");
-
- b.Property("IncludeJwtId");
-
- b.Property("LogoUri")
- .HasMaxLength(2000);
-
- b.Property("PairWiseSubjectSalt")
- .HasMaxLength(200);
-
- b.Property("ProtocolType")
- .IsRequired()
- .HasMaxLength(200);
-
- b.Property("RefreshTokenExpiration");
-
- b.Property("RefreshTokenUsage");
-
- b.Property("RequireClientSecret");
-
- b.Property("RequireConsent");
-
- b.Property("RequirePkce");
-
- b.Property("SlidingRefreshTokenLifetime");
-
- b.Property("UpdateAccessTokenClaimsOnRefresh");
-
- b.HasKey("Id");
-
- b.HasIndex("ClientId")
- .IsUnique();
-
- b.ToTable("IdentityServerClients");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
-
- b.Property("ClientId");
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(250);
-
- b.Property("Value")
- .IsRequired()
- .HasMaxLength(250);
-
- b.HasKey("Id");
-
- b.HasIndex("ClientId");
-
- b.ToTable("IdentityServerClientClaims");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
- {
- b.Property("ClientId");
-
- b.Property("Origin")
- .HasMaxLength(150);
-
- b.HasKey("ClientId", "Origin");
-
- b.ToTable("IdentityServerClientCorsOrigins");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
- {
- b.Property("ClientId");
-
- b.Property("GrantType")
- .HasMaxLength(196);
-
- b.HasKey("ClientId", "GrantType");
-
- b.ToTable("IdentityServerClientGrantTypes");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
- {
- b.Property("ClientId");
-
- b.Property("Provider")
- .HasMaxLength(64);
-
- b.HasKey("ClientId", "Provider");
-
- b.ToTable("IdentityServerClientIdPRestrictions");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
- {
- b.Property("ClientId");
-
- b.Property("PostLogoutRedirectUri")
- .HasMaxLength(2000);
-
- b.HasKey("ClientId", "PostLogoutRedirectUri");
-
- b.ToTable("IdentityServerClientPostLogoutRedirectUris");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
- {
- b.Property("ClientId");
-
- b.Property("Key")
- .HasMaxLength(250);
-
- b.Property("Value")
- .IsRequired()
- .HasMaxLength(2000);
-
- b.HasKey("ClientId", "Key");
-
- b.ToTable("IdentityServerClientProperties");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
- {
- b.Property("ClientId");
-
- b.Property("RedirectUri")
- .HasMaxLength(2000);
-
- b.HasKey("ClientId", "RedirectUri");
-
- b.ToTable("IdentityServerClientRedirectUris");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
- {
- b.Property("ClientId");
-
- b.Property("Scope")
- .HasMaxLength(196);
-
- b.HasKey("ClientId", "Scope");
-
- b.ToTable("IdentityServerClientScopes");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
- {
- b.Property("ClientId");
-
- b.Property("Type")
- .HasMaxLength(32);
-
- b.Property("Value")
- .HasMaxLength(196);
-
- b.Property("Description")
- .HasMaxLength(256);
-
- b.Property("Expiration");
-
- b.HasKey("ClientId", "Type", "Value");
-
- b.ToTable("IdentityServerClientSecrets");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
- {
- b.Property("Key")
- .HasMaxLength(200);
-
- b.Property("ClientId")
- .IsRequired()
- .HasMaxLength(200);
-
- b.Property("CreationTime");
-
- b.Property("Data")
- .IsRequired();
-
- b.Property("Expiration");
-
- b.Property("Id");
-
- b.Property("SubjectId")
- .HasMaxLength(200);
-
- b.Property("Type")
- .IsRequired()
- .HasMaxLength(50);
-
- b.HasKey("Key");
-
- b.HasIndex("SubjectId", "ClientId", "Type");
-
- b.ToTable("IdentityServerPersistedGrants");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
- {
- b.Property("IdentityResourceId");
-
- b.Property("Type")
- .HasMaxLength(196);
-
- b.HasKey("IdentityResourceId", "Type");
-
- b.ToTable("IdentityServerIdentityClaims");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd();
-
- b.Property("Description")
- .HasMaxLength(1000);
-
- b.Property("DisplayName")
- .HasMaxLength(200);
-
- b.Property("Emphasize");
-
- b.Property("Enabled");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(200);
-
- b.Property("Required");
-
- b.Property("ShowInDiscoveryDocument");
-
- b.HasKey("Id");
-
- b.ToTable("IdentityServerIdentityResources");
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
- .WithMany("UserClaims")
- .HasForeignKey("ApiResourceId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
- .WithMany("Scopes")
- .HasForeignKey("ApiResourceId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope")
- .WithMany("UserClaims")
- .HasForeignKey("ApiResourceId", "Name")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiResource")
- .WithMany("Secrets")
- .HasForeignKey("ApiResourceId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("Claims")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("AllowedCorsOrigins")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("AllowedGrantTypes")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("IdentityProviderRestrictions")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("PostLogoutRedirectUris")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("Properties")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("RedirectUris")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("AllowedScopes")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.Clients.Client")
- .WithMany("ClientSecrets")
- .HasForeignKey("ClientId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-
- modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
- {
- b.HasOne("Volo.Abp.IdentityServer.IdentityResources.IdentityResource")
- .WithMany("UserClaims")
- .HasForeignKey("IdentityResourceId")
- .OnDelete(DeleteBehavior.Cascade);
- });
-#pragma warning restore 612, 618
- }
- }
-}
diff --git a/templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.cs b/templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.cs
deleted file mode 100644
index e0f5642cd7..0000000000
--- a/templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.cs
+++ /dev/null
@@ -1,252 +0,0 @@
-using System;
-using Microsoft.EntityFrameworkCore.Migrations;
-
-namespace IdentityServerHost.Migrations
-{
- public partial class Added_Identity : Migration
- {
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "AbpClaimTypes",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- Name = table.Column(maxLength: 256, nullable: false),
- Required = table.Column(nullable: false),
- IsStatic = table.Column(nullable: false),
- Regex = table.Column(maxLength: 512, nullable: true),
- RegexDescription = table.Column(maxLength: 128, nullable: true),
- Description = table.Column(maxLength: 256, nullable: true),
- ValueType = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpClaimTypes", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpRoles",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- TenantId = table.Column(nullable: true),
- Name = table.Column(maxLength: 256, nullable: false),
- NormalizedName = table.Column(maxLength: 256, nullable: false),
- ConcurrencyStamp = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpRoles", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpUsers",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- TenantId = table.Column(nullable: true),
- UserName = table.Column(maxLength: 256, nullable: false),
- NormalizedUserName = table.Column(maxLength: 256, nullable: false),
- Email = table.Column(maxLength: 256, nullable: true),
- NormalizedEmail = table.Column(maxLength: 256, nullable: true),
- EmailConfirmed = table.Column(nullable: false, defaultValue: false),
- PasswordHash = table.Column(maxLength: 256, nullable: true),
- SecurityStamp = table.Column(maxLength: 256, nullable: false),
- ConcurrencyStamp = table.Column(maxLength: 256, nullable: false),
- PhoneNumber = table.Column(maxLength: 16, nullable: true),
- PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false),
- TwoFactorEnabled = table.Column(nullable: false, defaultValue: false),
- LockoutEnd = table.Column(nullable: true),
- LockoutEnabled = table.Column(nullable: false, defaultValue: false),
- AccessFailedCount = table.Column(nullable: false, defaultValue: 0),
- ExtraProperties = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpUsers", x => x.Id);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpRoleClaims",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- TenantId = table.Column(nullable: true),
- ClaimType = table.Column(maxLength: 256, nullable: false),
- ClaimValue = table.Column(maxLength: 1024, nullable: true),
- RoleId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpRoleClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AbpRoleClaims_AbpRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AbpRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpUserClaims",
- columns: table => new
- {
- Id = table.Column(nullable: false),
- TenantId = table.Column(nullable: true),
- ClaimType = table.Column(maxLength: 256, nullable: false),
- ClaimValue = table.Column(maxLength: 1024, nullable: true),
- UserId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpUserClaims", x => x.Id);
- table.ForeignKey(
- name: "FK_AbpUserClaims_AbpUsers_UserId",
- column: x => x.UserId,
- principalTable: "AbpUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpUserLogins",
- columns: table => new
- {
- TenantId = table.Column(nullable: true),
- UserId = table.Column(nullable: false),
- LoginProvider = table.Column(maxLength: 64, nullable: false),
- ProviderKey = table.Column(maxLength: 196, nullable: false),
- ProviderDisplayName = table.Column(maxLength: 128, nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider });
- table.ForeignKey(
- name: "FK_AbpUserLogins_AbpUsers_UserId",
- column: x => x.UserId,
- principalTable: "AbpUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpUserRoles",
- columns: table => new
- {
- TenantId = table.Column(nullable: true),
- UserId = table.Column(nullable: false),
- RoleId = table.Column(nullable: false)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId });
- table.ForeignKey(
- name: "FK_AbpUserRoles_AbpRoles_RoleId",
- column: x => x.RoleId,
- principalTable: "AbpRoles",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- table.ForeignKey(
- name: "FK_AbpUserRoles_AbpUsers_UserId",
- column: x => x.UserId,
- principalTable: "AbpUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateTable(
- name: "AbpUserTokens",
- columns: table => new
- {
- TenantId = table.Column(nullable: true),
- UserId = table.Column(nullable: false),
- LoginProvider = table.Column(maxLength: 64, nullable: false),
- Name = table.Column(maxLength: 128, nullable: false),
- Value = table.Column(nullable: true)
- },
- constraints: table =>
- {
- table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name });
- table.ForeignKey(
- name: "FK_AbpUserTokens_AbpUsers_UserId",
- column: x => x.UserId,
- principalTable: "AbpUsers",
- principalColumn: "Id",
- onDelete: ReferentialAction.Cascade);
- });
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpRoleClaims_RoleId",
- table: "AbpRoleClaims",
- column: "RoleId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpRoles_NormalizedName",
- table: "AbpRoles",
- column: "NormalizedName");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUserClaims_UserId",
- table: "AbpUserClaims",
- column: "UserId");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUserLogins_LoginProvider_ProviderKey",
- table: "AbpUserLogins",
- columns: new[] { "LoginProvider", "ProviderKey" });
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUserRoles_RoleId_UserId",
- table: "AbpUserRoles",
- columns: new[] { "RoleId", "UserId" });
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUsers_Email",
- table: "AbpUsers",
- column: "Email");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUsers_NormalizedEmail",
- table: "AbpUsers",
- column: "NormalizedEmail");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUsers_NormalizedUserName",
- table: "AbpUsers",
- column: "NormalizedUserName");
-
- migrationBuilder.CreateIndex(
- name: "IX_AbpUsers_UserName",
- table: "AbpUsers",
- column: "UserName");
- }
-
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "AbpClaimTypes");
-
- migrationBuilder.DropTable(
- name: "AbpRoleClaims");
-
- migrationBuilder.DropTable(
- name: "AbpUserClaims");
-
- migrationBuilder.DropTable(
- name: "AbpUserLogins");
-
- migrationBuilder.DropTable(
- name: "AbpUserRoles");
-
- migrationBuilder.DropTable(
- name: "AbpUserTokens");
-
- migrationBuilder.DropTable(
- name: "AbpRoles");
-
- migrationBuilder.DropTable(
- name: "AbpUsers");
- }
- }
-}
diff --git a/templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.Designer.cs b/templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.Designer.cs
similarity index 91%
rename from templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.Designer.cs
rename to templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.Designer.cs
index e3603c4fec..63b2af58a7 100644
--- a/templates/service/host/IdentityServerHost/Migrations/20181031081104_Added_Identity.Designer.cs
+++ b/templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.Designer.cs
@@ -10,8 +10,8 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace IdentityServerHost.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
- [Migration("20181031081104_Added_Identity")]
- partial class Added_Identity
+ [Migration("20181212121034_Initial")]
+ partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
@@ -26,9 +26,18 @@ namespace IdentityServerHost.Migrations
b.Property("Id")
.ValueGeneratedOnAdd();
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasMaxLength(256);
+
b.Property("Description")
.HasMaxLength(256);
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
b.Property("IsStatic");
b.Property("Name")
@@ -55,7 +64,23 @@ namespace IdentityServerHost.Migrations
b.Property("Id")
.ValueGeneratedOnAdd();
- b.Property("ConcurrencyStamp");
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasMaxLength(256);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDefault")
+ .HasColumnName("IsDefault");
+
+ b.Property("IsPublic")
+ .HasColumnName("IsPublic");
+
+ b.Property("IsStatic")
+ .HasColumnName("IsStatic");
b.Property("Name")
.IsRequired()
@@ -108,10 +133,19 @@ namespace IdentityServerHost.Migrations
.HasDefaultValue(0);
b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
.IsRequired()
.HasColumnName("ConcurrencyStamp")
.HasMaxLength(256);
+ b.Property("CreationTime");
+
+ b.Property("CreatorId");
+
+ b.Property("DeleterId");
+
+ b.Property("DeletionTime");
+
b.Property("Email")
.HasColumnName("Email")
.HasMaxLength(256);
@@ -124,6 +158,12 @@ namespace IdentityServerHost.Migrations
b.Property("ExtraProperties")
.HasColumnName("ExtraProperties");
+ b.Property("IsDeleted");
+
+ b.Property("LastModificationTime");
+
+ b.Property("LastModifierId");
+
b.Property("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasColumnName("LockoutEnabled")
@@ -131,6 +171,10 @@ namespace IdentityServerHost.Migrations
b.Property("LockoutEnd");
+ b.Property("Name")
+ .HasColumnName("Name")
+ .HasMaxLength(64);
+
b.Property("NormalizedEmail")
.HasColumnName("NormalizedEmail")
.HasMaxLength(256);
@@ -158,6 +202,10 @@ namespace IdentityServerHost.Migrations
.HasColumnName("SecurityStamp")
.HasMaxLength(256);
+ b.Property("Surname")
+ .HasColumnName("Surname")
+ .HasMaxLength(64);
+
b.Property("TenantId")
.HasColumnName("TenantId");
@@ -269,6 +317,8 @@ namespace IdentityServerHost.Migrations
b.Property("Id")
.ValueGeneratedOnAdd();
+ b.Property("ConcurrencyStamp");
+
b.Property("Description")
.HasMaxLength(1000);
@@ -277,6 +327,9 @@ namespace IdentityServerHost.Migrations
b.Property("Enabled");
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
b.Property("Name")
.IsRequired()
.HasMaxLength(200);
@@ -400,6 +453,8 @@ namespace IdentityServerHost.Migrations
b.Property("ClientUri")
.HasMaxLength(2000);
+ b.Property("ConcurrencyStamp");
+
b.Property("ConsentLifetime");
b.Property("Description")
@@ -409,6 +464,9 @@ namespace IdentityServerHost.Migrations
b.Property("Enabled");
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
b.Property("FrontChannelLogoutSessionRequired");
b.Property("FrontChannelLogoutUri")
@@ -589,6 +647,8 @@ namespace IdentityServerHost.Migrations
.IsRequired()
.HasMaxLength(200);
+ b.Property("ConcurrencyStamp");
+
b.Property("CreationTime");
b.Property("Data")
@@ -596,6 +656,9 @@ namespace IdentityServerHost.Migrations
b.Property("Expiration");
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
b.Property("Id");
b.Property("SubjectId")
@@ -629,6 +692,8 @@ namespace IdentityServerHost.Migrations
b.Property("Id")
.ValueGeneratedOnAdd();
+ b.Property("ConcurrencyStamp");
+
b.Property("Description")
.HasMaxLength(1000);
@@ -639,6 +704,9 @@ namespace IdentityServerHost.Migrations
b.Property("Enabled");
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
b.Property("Name")
.IsRequired()
.HasMaxLength(200);
diff --git a/templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.cs b/templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.cs
similarity index 63%
rename from templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.cs
rename to templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.cs
index 106f351d90..cab668b256 100644
--- a/templates/service/host/IdentityServerHost/Migrations/20181031075019_Initial.cs
+++ b/templates/service/host/IdentityServerHost/Migrations/20181212121034_Initial.cs
@@ -7,11 +7,88 @@ namespace IdentityServerHost.Migrations
{
protected override void Up(MigrationBuilder migrationBuilder)
{
+ migrationBuilder.CreateTable(
+ name: "AbpClaimTypes",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false),
+ ExtraProperties = table.Column(nullable: true),
+ ConcurrencyStamp = table.Column(maxLength: 256, nullable: false),
+ Name = table.Column(maxLength: 256, nullable: false),
+ Required = table.Column(nullable: false),
+ IsStatic = table.Column(nullable: false),
+ Regex = table.Column(maxLength: 512, nullable: true),
+ RegexDescription = table.Column(maxLength: 128, nullable: true),
+ Description = table.Column(maxLength: 256, nullable: true),
+ ValueType = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpClaimTypes", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpRoles",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false),
+ ExtraProperties = table.Column(nullable: true),
+ ConcurrencyStamp = table.Column(maxLength: 256, nullable: false),
+ TenantId = table.Column(nullable: true),
+ Name = table.Column(maxLength: 256, nullable: false),
+ NormalizedName = table.Column(maxLength: 256, nullable: false),
+ IsDefault = table.Column(nullable: false),
+ IsStatic = table.Column(nullable: false),
+ IsPublic = table.Column(nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpRoles", x => x.Id);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "AbpUsers",
+ columns: table => new
+ {
+ Id = table.Column(nullable: false),
+ ExtraProperties = table.Column(nullable: true),
+ ConcurrencyStamp = table.Column(maxLength: 256, nullable: false),
+ CreationTime = table.Column(nullable: false),
+ CreatorId = table.Column(nullable: true),
+ LastModificationTime = table.Column(nullable: true),
+ LastModifierId = table.Column(nullable: true),
+ IsDeleted = table.Column(nullable: false),
+ DeleterId = table.Column(nullable: true),
+ DeletionTime = table.Column(nullable: true),
+ TenantId = table.Column(nullable: true),
+ UserName = table.Column(maxLength: 256, nullable: false),
+ NormalizedUserName = table.Column(maxLength: 256, nullable: false),
+ Name = table.Column(maxLength: 64, nullable: true),
+ Surname = table.Column(maxLength: 64, nullable: true),
+ Email = table.Column(maxLength: 256, nullable: true),
+ NormalizedEmail = table.Column(maxLength: 256, nullable: true),
+ EmailConfirmed = table.Column(nullable: false, defaultValue: false),
+ PasswordHash = table.Column(maxLength: 256, nullable: true),
+ SecurityStamp = table.Column(maxLength: 256, nullable: false),
+ PhoneNumber = table.Column(maxLength: 16, nullable: true),
+ PhoneNumberConfirmed = table.Column(nullable: false, defaultValue: false),
+ TwoFactorEnabled = table.Column(nullable: false, defaultValue: false),
+ LockoutEnd = table.Column(nullable: true),
+ LockoutEnabled = table.Column(nullable: false, defaultValue: false),
+ AccessFailedCount = table.Column(nullable: false, defaultValue: 0)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_AbpUsers", x => x.Id);
+ });
+
migrationBuilder.CreateTable(
name: "IdentityServerApiResources",
columns: table => new
{
Id = table.Column