Browse Source

Add migration for microservice

pull/965/head
Halil ibrahim Kalkan 7 years ago
parent
commit
9fbb3f1104
  1. 1227
      samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190404130536_Make_IDS4_Entities_Audited.Designer.cs
  2. 347
      samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190404130536_Make_IDS4_Entities_Audited.cs
  3. 87
      samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs

1227
samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190404130536_Make_IDS4_Entities_Audited.Designer.cs

File diff suppressed because it is too large

347
samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/20190404130536_Make_IDS4_Entities_Audited.cs

@ -0,0 +1,347 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace AuthServer.Host.Migrations
{
public partial class Make_IDS4_Entities_Audited : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerIdentityResources",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "IdentityServerIdentityResources",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "IdentityServerIdentityResources",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerIdentityResources",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "IdentityServerIdentityResources",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerIdentityResources",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "IdentityServerIdentityResources",
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "LogoUri",
table: "IdentityServerClients",
maxLength: 300,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 2000,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "FrontChannelLogoutUri",
table: "IdentityServerClients",
maxLength: 300,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 2000,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ClientUri",
table: "IdentityServerClients",
maxLength: 300,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 2000,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BackChannelLogoutUri",
table: "IdentityServerClients",
maxLength: 300,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 2000,
oldNullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerClients",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "IdentityServerClients",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "IdentityServerClients",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerClients",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "IdentityServerClients",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerClients",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "IdentityServerClients",
nullable: true);
//migrationBuilder.AlterColumn<string>(
// name: "RedirectUri",
// table: "IdentityServerClientRedirectUris",
// maxLength: 200,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 2000);
//migrationBuilder.AlterColumn<string>(
// name: "Value",
// table: "IdentityServerClientProperties",
// maxLength: 128,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 2000);
//migrationBuilder.AlterColumn<string>(
// name: "Key",
// table: "IdentityServerClientProperties",
// maxLength: 64,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 250);
migrationBuilder.AddColumn<DateTime>(
name: "CreationTime",
table: "IdentityServerApiResources",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatorId",
table: "IdentityServerApiResources",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "DeleterId",
table: "IdentityServerApiResources",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "DeletionTime",
table: "IdentityServerApiResources",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IsDeleted",
table: "IdentityServerApiResources",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "LastModificationTime",
table: "IdentityServerApiResources",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "LastModifierId",
table: "IdentityServerApiResources",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "EntityTenantId",
table: "AbpEntityChanges",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "TenantName",
table: "AbpAuditLogs",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "CreationTime",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "IdentityServerIdentityResources");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "IdentityServerClients");
migrationBuilder.DropColumn(
name: "CreationTime",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "CreatorId",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "DeleterId",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "DeletionTime",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "IsDeleted",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "LastModificationTime",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "LastModifierId",
table: "IdentityServerApiResources");
migrationBuilder.DropColumn(
name: "EntityTenantId",
table: "AbpEntityChanges");
migrationBuilder.DropColumn(
name: "TenantName",
table: "AbpAuditLogs");
migrationBuilder.AlterColumn<string>(
name: "LogoUri",
table: "IdentityServerClients",
maxLength: 2000,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 300,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "FrontChannelLogoutUri",
table: "IdentityServerClients",
maxLength: 2000,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 300,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "ClientUri",
table: "IdentityServerClients",
maxLength: 2000,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 300,
oldNullable: true);
migrationBuilder.AlterColumn<string>(
name: "BackChannelLogoutUri",
table: "IdentityServerClients",
maxLength: 2000,
nullable: true,
oldClrType: typeof(string),
oldMaxLength: 300,
oldNullable: true);
//migrationBuilder.AlterColumn<string>(
// name: "RedirectUri",
// table: "IdentityServerClientRedirectUris",
// maxLength: 2000,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 200);
//migrationBuilder.AlterColumn<string>(
// name: "Value",
// table: "IdentityServerClientProperties",
// maxLength: 2000,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 128);
//migrationBuilder.AlterColumn<string>(
// name: "Key",
// table: "IdentityServerClientProperties",
// maxLength: 250,
// nullable: false,
// oldClrType: typeof(string),
// oldMaxLength: 64);
}
}
}

87
samples/MicroserviceDemo/applications/AuthServer.Host/Migrations/AuthServerDbContextModelSnapshot.cs

@ -82,6 +82,8 @@ namespace AuthServer.Host.Migrations
b.Property<Guid?>("TenantId")
.HasColumnName("TenantId");
b.Property<string>("TenantName");
b.Property<string>("Url")
.HasColumnName("Url")
.HasMaxLength(256);
@ -161,6 +163,8 @@ namespace AuthServer.Host.Migrations
.HasColumnName("EntityId")
.HasMaxLength(128);
b.Property<Guid?>("EntityTenantId");
b.Property<string>("EntityTypeFullName")
.IsRequired()
.HasColumnName("EntityTypeFullName")
@ -520,6 +524,18 @@ namespace AuthServer.Host.Migrations
b.Property<string>("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1000);
@ -531,6 +547,17 @@ namespace AuthServer.Host.Migrations
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);
@ -639,7 +666,7 @@ namespace AuthServer.Host.Migrations
b.Property<bool>("BackChannelLogoutSessionRequired");
b.Property<string>("BackChannelLogoutUri")
.HasMaxLength(2000);
.HasMaxLength(300);
b.Property<string>("ClientClaimsPrefix")
.HasMaxLength(200);
@ -652,12 +679,24 @@ namespace AuthServer.Host.Migrations
.HasMaxLength(200);
b.Property<string>("ClientUri")
.HasMaxLength(2000);
.HasMaxLength(300);
b.Property<string>("ConcurrencyStamp");
b.Property<int?>("ConsentLifetime");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1000);
@ -671,14 +710,25 @@ namespace AuthServer.Host.Migrations
b.Property<bool>("FrontChannelLogoutSessionRequired");
b.Property<string>("FrontChannelLogoutUri")
.HasMaxLength(2000);
.HasMaxLength(300);
b.Property<int>("IdentityTokenLifetime");
b.Property<bool>("IncludeJwtId");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("LogoUri")
.HasMaxLength(2000);
.HasMaxLength(300);
b.Property<string>("PairWiseSubjectSalt")
.HasMaxLength(200);
@ -777,11 +827,11 @@ namespace AuthServer.Host.Migrations
b.Property<Guid>("ClientId");
b.Property<string>("Key")
.HasMaxLength(250);
.HasMaxLength(64);
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(2000);
.HasMaxLength(128);
b.HasKey("ClientId", "Key");
@ -793,7 +843,7 @@ namespace AuthServer.Host.Migrations
b.Property<Guid>("ClientId");
b.Property<string>("RedirectUri")
.HasMaxLength(2000);
.HasMaxLength(200);
b.HasKey("ClientId", "RedirectUri");
@ -888,6 +938,18 @@ namespace AuthServer.Host.Migrations
b.Property<string>("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnName("DeletionTime");
b.Property<string>("Description")
.HasMaxLength(1000);
@ -901,6 +963,17 @@ namespace AuthServer.Host.Migrations
b.Property<string>("ExtraProperties")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnName("IsDeleted")
.HasDefaultValue(false);
b.Property<DateTime?>("LastModificationTime")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(200);

Loading…
Cancel
Save