mirror of https://github.com/abpframework/abp.git
6 changed files with 2609 additions and 165 deletions
@ -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" }); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -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
|
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
Loading…
Reference in new issue