Added migrations.

pull/206/head
Halil İbrahim Kalkan 8 years ago
parent 29fd0eba15
commit d9bd003021

@ -0,0 +1,251 @@
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
using Volo.Abp.Identity.EntityFrameworkCore;
namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
{
[DbContext(typeof(IdentityDbContext))]
[Migration("20180131140437_Identity_Revisions")]
partial class Identity_Revisions
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.0.0-rtm-26452")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedName");
b.ToTable("IdentityRoles");
});
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.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("IdentityRoleClaims");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AccessFailedCount")
.ValueGeneratedOnAdd()
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Email")
.HasMaxLength(256);
b.Property<bool>("EmailConfirmed")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<bool>("LockoutEnabled")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<string>("NormalizedEmail")
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("SecurityStamp")
.IsRequired()
.HasMaxLength(256);
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(256);
b.HasKey("Id");
b.HasIndex("NormalizedEmail");
b.HasIndex("NormalizedUserName");
b.ToTable("IdentityUsers");
});
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>("UserId");
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("IdentityUserClaims");
});
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.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.ToTable("IdentityUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.ToTable("IdentityUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.HasMaxLength(128);
b.Property<string>("Name");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("IdentityUserTokens");
});
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);
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,323 @@
using Microsoft.EntityFrameworkCore.Migrations;
using System;
using System.Collections.Generic;
namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
{
public partial class Identity_Revisions : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserTokens",
table: "IdentityUserTokens");
migrationBuilder.DropIndex(
name: "IX_IdentityUserTokens_UserId_LoginProvider_Name",
table: "IdentityUserTokens");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserRoles",
table: "IdentityUserRoles");
migrationBuilder.DropIndex(
name: "IX_IdentityUserRoles_UserId_RoleId",
table: "IdentityUserRoles");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserLogins",
table: "IdentityUserLogins");
migrationBuilder.DropIndex(
name: "IX_IdentityUserLogins_UserId_LoginProvider_ProviderKey",
table: "IdentityUserLogins");
migrationBuilder.DropColumn(
name: "Id",
table: "IdentityUserTokens");
migrationBuilder.DropColumn(
name: "Id",
table: "IdentityUserRoles");
migrationBuilder.DropColumn(
name: "Id",
table: "IdentityUserLogins");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "IdentityUserTokens",
type: "nvarchar(450)",
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "LoginProvider",
table: "IdentityUserTokens",
type: "nvarchar(128)",
maxLength: 128,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 64);
migrationBuilder.AlterColumn<string>(
name: "UserName",
table: "IdentityUsers",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "SecurityStamp",
table: "IdentityUsers",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PhoneNumber",
table: "IdentityUsers",
type: "nvarchar(16)",
maxLength: 16,
nullable: true,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PasswordHash",
table: "IdentityUsers",
type: "nvarchar(256)",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "NormalizedUserName",
table: "IdentityUsers",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "IdentityUsers",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ProviderKey",
table: "IdentityUserLogins",
type: "nvarchar(196)",
maxLength: 196,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "NormalizedName",
table: "IdentityRoles",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "IdentityRoles",
type: "nvarchar(256)",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserTokens",
table: "IdentityUserTokens",
columns: new[] { "UserId", "LoginProvider", "Name" });
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserRoles",
table: "IdentityUserRoles",
columns: new[] { "UserId", "RoleId" });
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserLogins",
table: "IdentityUserLogins",
columns: new[] { "UserId", "LoginProvider" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserTokens",
table: "IdentityUserTokens");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserRoles",
table: "IdentityUserRoles");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityUserLogins",
table: "IdentityUserLogins");
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "IdentityUserTokens",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)");
migrationBuilder.AlterColumn<string>(
name: "LoginProvider",
table: "IdentityUserTokens",
maxLength: 64,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(128)",
oldMaxLength: 128);
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "IdentityUserTokens",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AlterColumn<string>(
name: "UserName",
table: "IdentityUsers",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "SecurityStamp",
table: "IdentityUsers",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "PhoneNumber",
table: "IdentityUsers",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(16)",
oldMaxLength: 16,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "PasswordHash",
table: "IdentityUsers",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "NormalizedUserName",
table: "IdentityUsers",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "ConcurrencyStamp",
table: "IdentityUsers",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "IdentityUserRoles",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AlterColumn<string>(
name: "ProviderKey",
table: "IdentityUserLogins",
maxLength: 256,
nullable: false,
oldClrType: typeof(string),
oldType: "nvarchar(196)",
oldMaxLength: 196);
migrationBuilder.AddColumn<Guid>(
name: "Id",
table: "IdentityUserLogins",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"));
migrationBuilder.AlterColumn<string>(
name: "NormalizedName",
table: "IdentityRoles",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AlterColumn<string>(
name: "Name",
table: "IdentityRoles",
maxLength: 256,
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(256)",
oldMaxLength: 256);
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserTokens",
table: "IdentityUserTokens",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserRoles",
table: "IdentityUserRoles",
column: "Id");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityUserLogins",
table: "IdentityUserLogins",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_IdentityUserTokens_UserId_LoginProvider_Name",
table: "IdentityUserTokens",
columns: new[] { "UserId", "LoginProvider", "Name" });
migrationBuilder.CreateIndex(
name: "IX_IdentityUserRoles_UserId_RoleId",
table: "IdentityUserRoles",
columns: new[] { "UserId", "RoleId" });
migrationBuilder.CreateIndex(
name: "IX_IdentityUserLogins_UserId_LoginProvider_ProviderKey",
table: "IdentityUserLogins",
columns: new[] { "UserId", "LoginProvider", "ProviderKey" });
}
}
}

@ -1,7 +1,12 @@
using System;
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
using Volo.Abp.Identity.EntityFrameworkCore;
namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
{
@ -10,8 +15,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
.HasAnnotation("ProductVersion", "2.0.0-rtm-26452")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
@ -23,9 +29,11 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
.IsConcurrencyToken();
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("NormalizedName")
.IsRequired()
.HasMaxLength(256);
b.HasKey("Id");
@ -66,7 +74,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
.HasDefaultValue(0);
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
.IsConcurrencyToken()
.IsRequired()
.HasMaxLength(256);
b.Property<string>("Email")
.HasMaxLength(256);
@ -85,23 +95,29 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
.HasMaxLength(256);
b.Property<string>("NormalizedUserName")
.IsRequired()
.HasMaxLength(256);
b.Property<string>("PasswordHash");
b.Property<string>("PasswordHash")
.HasMaxLength(256);
b.Property<string>("PhoneNumber");
b.Property<string>("PhoneNumber")
.HasMaxLength(16);
b.Property<bool>("PhoneNumberConfirmed")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("SecurityStamp");
b.Property<string>("SecurityStamp")
.IsRequired()
.HasMaxLength(256);
b.Property<bool>("TwoFactorEnabled")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("UserName")
.IsRequired()
.HasMaxLength(256);
b.HasKey("Id");
@ -136,11 +152,9 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.IsRequired()
.HasMaxLength(64);
b.Property<string>("ProviderDisplayName")
@ -148,55 +162,40 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
b.Property<string>("ProviderKey")
.IsRequired()
.HasMaxLength(256);
b.Property<Guid>("UserId");
.HasMaxLength(196);
b.HasKey("Id");
b.HasKey("UserId", "LoginProvider");
b.HasIndex("LoginProvider", "ProviderKey");
b.HasIndex("UserId", "LoginProvider", "ProviderKey");
b.ToTable("IdentityUserLogins");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("UserId");
b.Property<Guid>("RoleId");
b.Property<Guid>("UserId");
b.HasKey("Id");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId", "UserId");
b.HasIndex("UserId", "RoleId");
b.ToTable("IdentityUserRoles");
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("UserId");
b.Property<string>("LoginProvider")
.IsRequired()
.HasMaxLength(64);
.HasMaxLength(128);
b.Property<string>("Name");
b.Property<Guid>("UserId");
b.Property<string>("Value");
b.HasKey("Id");
b.HasIndex("UserId", "LoginProvider", "Name");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("IdentityUserTokens");
});
@ -245,6 +244,7 @@ namespace Volo.Abp.Identity.EntityFrameworkCore.Migrations
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
#pragma warning restore 612, 618
}
}
}

@ -0,0 +1,526 @@
// <auto-generated />
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.EntityFrameworkCore.Storage.Internal;
using System;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
{
[DbContext(typeof(IdentityServerDbContext))]
[Migration("20180131140336_IdentityServer_Revisions")]
partial class IdentityServer_Revisions
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.0.0-rtm-26452")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Description")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasMaxLength(200);
b.Property<bool>("Enabled");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);
b.HasKey("Id");
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.Property<Guid>("ApiResourceId");
b.Property<string>("Type")
.HasMaxLength(196);
b.HasKey("ApiResourceId", "Type");
b.ToTable("IdentityServerApiClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.Property<Guid>("ApiResourceId");
b.Property<string>("Name")
.HasMaxLength(196);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<string>("DisplayName")
.HasMaxLength(128);
b.Property<bool>("Emphasize");
b.Property<bool>("Required");
b.Property<bool>("ShowInDiscoveryDocument");
b.HasKey("ApiResourceId", "Name");
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.Property<Guid>("ApiResourceId");
b.Property<string>("Name")
.HasMaxLength(196);
b.Property<string>("Type")
.HasMaxLength(196);
b.HasKey("ApiResourceId", "Name", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.Property<Guid>("ApiResourceId");
b.Property<string>("Type")
.HasMaxLength(32);
b.Property<string>("Value")
.HasMaxLength(196);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<DateTime?>("Expiration");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("IdentityServerApiSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<int>("AbsoluteRefreshTokenLifetime");
b.Property<int>("AccessTokenLifetime");
b.Property<int>("AccessTokenType");
b.Property<bool>("AllowAccessTokensViaBrowser");
b.Property<bool>("AllowOfflineAccess");
b.Property<bool>("AllowPlainTextPkce");
b.Property<bool>("AllowRememberConsent");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken");
b.Property<bool>("AlwaysSendClientClaims");
b.Property<int>("AuthorizationCodeLifetime");
b.Property<bool>("BackChannelLogoutSessionRequired");
b.Property<string>("BackChannelLogoutUri")
.HasMaxLength(2000);
b.Property<string>("ClientClaimsPrefix")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);
b.Property<string>("ClientName")
.HasMaxLength(200);
b.Property<string>("ClientUri")
.HasMaxLength(2000);
b.Property<int?>("ConsentLifetime");
b.Property<string>("Description")
.HasMaxLength(1000);
b.Property<bool>("EnableLocalLogin");
b.Property<bool>("Enabled");
b.Property<bool>("FrontChannelLogoutSessionRequired");
b.Property<string>("FrontChannelLogoutUri")
.HasMaxLength(2000);
b.Property<int>("IdentityTokenLifetime");
b.Property<bool>("IncludeJwtId");
b.Property<string>("LogoUri")
.HasMaxLength(2000);
b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);
b.Property<string>("ProtocolType")
.IsRequired()
.HasMaxLength(200);
b.Property<int>("RefreshTokenExpiration");
b.Property<int>("RefreshTokenUsage");
b.Property<bool>("RequireClientSecret");
b.Property<bool>("RequireConsent");
b.Property<bool>("RequirePkce");
b.Property<int>("SlidingRefreshTokenLifetime");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh");
b.HasKey("Id");
b.HasIndex("ClientId")
.IsUnique();
b.ToTable("IdentityServerClients");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(250);
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("IdentityServerClientClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("Origin")
.HasMaxLength(150);
b.HasKey("ClientId", "Origin");
b.ToTable("IdentityServerClientCorsOrigins");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("GrantType")
.HasMaxLength(196);
b.HasKey("ClientId", "GrantType");
b.ToTable("IdentityServerClientGrantTypes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("Provider")
.HasMaxLength(64);
b.HasKey("ClientId", "Provider");
b.ToTable("IdentityServerClientIdPRestrictions");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("PostLogoutRedirectUri")
.HasMaxLength(2000);
b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("IdentityServerClientPostLogoutRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("Key")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);
b.HasKey("ClientId", "Key");
b.ToTable("IdentityServerClientProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("RedirectUri")
.HasMaxLength(2000);
b.HasKey("ClientId", "RedirectUri");
b.ToTable("IdentityServerClientRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("Scope")
.HasMaxLength(196);
b.HasKey("ClientId", "Scope");
b.ToTable("IdentityServerClientScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.Property<Guid>("ClientId");
b.Property<string>("Type")
.HasMaxLength(32);
b.Property<string>("Value")
.HasMaxLength(196);
b.Property<string>("Description")
.HasMaxLength(256);
b.Property<DateTime?>("Expiration");
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
{
b.Property<string>("Key")
.HasMaxLength(200);
b.Property<string>("ClientId")
.IsRequired()
.HasMaxLength(200);
b.Property<DateTime>("CreationTime");
b.Property<string>("Data")
.IsRequired();
b.Property<DateTime?>("Expiration");
b.Property<Guid>("Id");
b.Property<string>("SubjectId")
.HasMaxLength(200);
b.Property<string>("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<Guid>("IdentityResourceId");
b.Property<string>("Type")
.HasMaxLength(196);
b.HasKey("IdentityResourceId", "Type");
b.ToTable("IdentityServerIdentityClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("Description")
.HasMaxLength(1000);
b.Property<string>("DisplayName")
.HasMaxLength(200);
b.Property<bool>("Emphasize");
b.Property<bool>("Enabled");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);
b.Property<bool>("Required");
b.Property<bool>("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
}
}
}

@ -39,104 +39,78 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpIdsApiResources");
b.ToTable("IdentityServerApiResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ApiResourceId");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);
.HasMaxLength(196);
b.HasKey("Id");
b.HasKey("ApiResourceId", "Type");
b.HasIndex("ApiResourceId");
b.ToTable("AbpIdsApiClaims");
b.ToTable("IdentityServerApiClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ApiResourceId");
b.Property<string>("Name")
.HasMaxLength(196);
b.Property<string>("Description")
.HasMaxLength(1000);
.HasMaxLength(256);
b.Property<string>("DisplayName")
.HasMaxLength(200);
.HasMaxLength(128);
b.Property<bool>("Emphasize");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);
b.Property<bool>("Required");
b.Property<bool>("ShowInDiscoveryDocument");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.HasKey("ApiResourceId", "Name");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpIdsApiScopes");
b.ToTable("IdentityServerApiScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ApiResourceId");
b.Property<Guid>("ApiScopeId");
b.Property<string>("Name")
.HasMaxLength(196);
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);
b.HasKey("Id");
.HasMaxLength(196);
b.HasIndex("ApiScopeId");
b.HasKey("ApiResourceId", "Name", "Type");
b.ToTable("AbpIdsApiScopeClaims");
b.ToTable("IdentityServerApiScopeClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ApiResourceId");
b.Property<string>("Description")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration");
b.Property<string>("Type")
.HasMaxLength(250);
.HasMaxLength(32);
b.Property<string>("Value")
.HasMaxLength(2000);
.HasMaxLength(196);
b.HasKey("Id");
b.Property<string>("Description")
.HasMaxLength(256);
b.HasIndex("ApiResourceId");
b.Property<DateTime?>("Expiration");
b.HasKey("ApiResourceId", "Type", "Value");
b.ToTable("AbpIdsApiSecrets");
b.ToTable("IdentityServerApiSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
@ -229,7 +203,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.HasIndex("ClientId")
.IsUnique();
b.ToTable("AbpIdsClients");
b.ToTable("IdentityServerClients");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientClaim", b =>
@ -251,25 +225,19 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.HasIndex("ClientId");
b.ToTable("AbpIdsClientClaims");
b.ToTable("IdentityServerClientClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientCorsOrigin", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Origin")
.IsRequired()
.HasMaxLength(150);
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasKey("ClientId", "Origin");
b.ToTable("AbpIdsClientCorsOrigins");
b.ToTable("IdentityServerClientCorsOrigins");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientGrantType", b =>
@ -277,131 +245,95 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.Property<Guid>("ClientId");
b.Property<string>("GrantType")
.HasMaxLength(250);
.HasMaxLength(196);
b.HasKey("ClientId", "GrantType");
b.ToTable("AbpIdsClientGrantTypes");
b.ToTable("IdentityServerClientGrantTypes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientIdPRestriction", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Provider")
.IsRequired()
.HasMaxLength(200);
b.HasKey("Id");
.HasMaxLength(64);
b.HasIndex("ClientId");
b.HasKey("ClientId", "Provider");
b.ToTable("AbpIdsClientIdPRestrictions");
b.ToTable("IdentityServerClientIdPRestrictions");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientPostLogoutRedirectUri", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("PostLogoutRedirectUri")
.IsRequired()
.HasMaxLength(2000);
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasKey("ClientId", "PostLogoutRedirectUri");
b.ToTable("AbpIdsClientPostLogoutRedirectUris");
b.ToTable("IdentityServerClientPostLogoutRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientProperty", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Key")
.IsRequired()
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasKey("ClientId", "Key");
b.ToTable("AbpIdsClientProperties");
b.ToTable("IdentityServerClientProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientRedirectUri", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("RedirectUri")
.IsRequired()
.HasMaxLength(2000);
b.HasKey("Id");
b.HasIndex("ClientId");
b.HasKey("ClientId", "RedirectUri");
b.ToTable("AbpIdsClientRedirectUris");
b.ToTable("IdentityServerClientRedirectUris");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientScope", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Scope")
.IsRequired()
.HasMaxLength(200);
b.HasKey("Id");
.HasMaxLength(196);
b.HasIndex("ClientId");
b.HasKey("ClientId", "Scope");
b.ToTable("AbpIdsClientScopes");
b.ToTable("IdentityServerClientScopes");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.ClientSecret", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("ClientId");
b.Property<string>("Description")
.HasMaxLength(2000);
b.Property<DateTime?>("Expiration");
b.Property<string>("Type")
.HasMaxLength(250);
.HasMaxLength(32);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);
.HasMaxLength(196);
b.HasKey("Id");
b.Property<string>("Description")
.HasMaxLength(256);
b.HasIndex("ClientId");
b.Property<DateTime?>("Expiration");
b.ToTable("AbpIdsClientSecrets");
b.HasKey("ClientId", "Type", "Value");
b.ToTable("IdentityServerClientSecrets");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.Grants.PersistedGrant", b =>
@ -433,25 +365,19 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.HasIndex("SubjectId", "ClientId", "Type");
b.ToTable("AbpIdsPersistedGrants");
b.ToTable("IdentityServerPersistedGrants");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityClaim", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<Guid>("IdentityResourceId");
b.Property<string>("Type")
.IsRequired()
.HasMaxLength(200);
.HasMaxLength(196);
b.HasKey("Id");
b.HasKey("IdentityResourceId", "Type");
b.HasIndex("IdentityResourceId");
b.ToTable("AbpIdsIdentityClaims");
b.ToTable("IdentityServerIdentityClaims");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.IdentityResources.IdentityResource", b =>
@ -479,10 +405,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("AbpIdsIdentityResources");
b.ToTable("IdentityServerIdentityResources");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
@ -505,7 +428,7 @@ namespace Volo.Abp.IdentityServer.EntityFrameworkCore.Migrations
{
b.HasOne("Volo.Abp.IdentityServer.ApiResources.ApiScope")
.WithMany("UserClaims")
.HasForeignKey("ApiScopeId")
.HasForeignKey("ApiResourceId", "Name")
.OnDelete(DeleteBehavior.Cascade);
});

Loading…
Cancel
Save