Update app template migrations.

pull/4578/head
maliming 5 years ago
parent b2beaa2b0c
commit cf75e6cdb3

@ -11,7 +11,7 @@ using Volo.Abp.EntityFrameworkCore;
namespace MyCompanyName.MyProjectName.Migrations
{
[DbContext(typeof(MyProjectNameMigrationsDbContext))]
[Migration("20200706091528_Initial")]
[Migration("20200707050900_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -863,6 +863,25 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpOrganizationUnitRoles");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key");
b.ToTable("IdentityServerApiResourceProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b =>
{
b.Property<Guid>("Id")
@ -928,14 +947,14 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources");
});
@ -981,8 +1000,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1076,15 +1095,11 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiScopeId", "Name", "Type");
b.HasKey("ApiScopeId", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
@ -1426,8 +1441,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1468,7 +1483,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("DeviceCode")
.IsRequired()
@ -1484,7 +1500,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
@ -1502,8 +1519,7 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.HasIndex("UserCode");
b.ToTable("IdentityServerDeviceFlowCodes");
});
@ -1537,7 +1553,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1550,7 +1567,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
@ -1567,6 +1585,8 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("SubjectId", "ClientId", "Type");
b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
@ -1937,6 +1957,15 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)

@ -250,8 +250,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Description = table.Column<string>(maxLength: 1000, nullable: true),
Enabled = table.Column<bool>(nullable: false),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(nullable: false),
Properties = table.Column<string>(nullable: true)
ShowInDiscoveryDocument = table.Column<bool>(nullable: false)
},
constraints: table =>
{
@ -356,9 +355,9 @@ namespace MyCompanyName.MyProjectName.Migrations
DeviceCode = table.Column<string>(maxLength: 200, nullable: false),
UserCode = table.Column<string>(maxLength: 200, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
SessionId = table.Column<string>(nullable: true),
SessionId = table.Column<string>(maxLength: 100, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
Description = table.Column<string>(nullable: true),
Description = table.Column<string>(maxLength: 200, nullable: true),
Expiration = table.Column<DateTime>(nullable: false),
Data = table.Column<string>(maxLength: 50000, nullable: false)
},
@ -404,9 +403,9 @@ namespace MyCompanyName.MyProjectName.Migrations
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true),
Type = table.Column<string>(maxLength: 50, nullable: false),
SubjectId = table.Column<string>(maxLength: 200, nullable: true),
SessionId = table.Column<string>(nullable: true),
SessionId = table.Column<string>(maxLength: 100, nullable: true),
ClientId = table.Column<string>(maxLength: 200, nullable: false),
Description = table.Column<string>(nullable: true),
Description = table.Column<string>(maxLength: 200, nullable: true),
CreationTime = table.Column<DateTime>(nullable: false),
Expiration = table.Column<DateTime>(nullable: true),
ConsumedTime = table.Column<DateTime>(nullable: true),
@ -667,6 +666,25 @@ namespace MyCompanyName.MyProjectName.Migrations
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiResourceProperties",
columns: table => new
{
ApiResourceId = table.Column<Guid>(nullable: false),
Key = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiResourceProperties", x => new { x.ApiResourceId, x.Key });
table.ForeignKey(
name: "FK_IdentityServerApiResourceProperties_IdentityServerApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "IdentityServerApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityServerApiResourceScopes",
columns: table => new
@ -692,7 +710,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 4000, nullable: false),
ApiResourceId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 2000, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
@ -711,12 +729,11 @@ namespace MyCompanyName.MyProjectName.Migrations
columns: table => new
{
Type = table.Column<string>(maxLength: 200, nullable: false),
ApiScopeId = table.Column<Guid>(nullable: false),
Name = table.Column<string>(maxLength: 200, nullable: false)
ApiScopeId = table.Column<Guid>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Name, x.Type });
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiScopeId, x.Type });
table.ForeignKey(
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiScopeId",
column: x => x.ApiScopeId,
@ -897,7 +914,7 @@ namespace MyCompanyName.MyProjectName.Migrations
Type = table.Column<string>(maxLength: 250, nullable: false),
Value = table.Column<string>(maxLength: 4000, nullable: false),
ClientId = table.Column<Guid>(nullable: false),
Description = table.Column<string>(maxLength: 2000, nullable: true),
Description = table.Column<string>(maxLength: 1000, nullable: true),
Expiration = table.Column<DateTime>(nullable: true)
},
constraints: table =>
@ -1096,6 +1113,12 @@ namespace MyCompanyName.MyProjectName.Migrations
table: "AbpUsers",
column: "UserName");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerApiResources_Name",
table: "IdentityServerApiResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_IdentityServerApiScopes_Name",
table: "IdentityServerApiScopes",
@ -1121,8 +1144,7 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.CreateIndex(
name: "IX_IdentityServerDeviceFlowCodes_UserCode",
table: "IdentityServerDeviceFlowCodes",
column: "UserCode",
unique: true);
column: "UserCode");
migrationBuilder.CreateIndex(
name: "IX_IdentityServerIdentityResources_Name",
@ -1139,6 +1161,11 @@ namespace MyCompanyName.MyProjectName.Migrations
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type",
table: "IdentityServerPersistedGrants",
columns: new[] { "SubjectId", "ClientId", "Type" });
migrationBuilder.CreateIndex(
name: "IX_IdentityServerPersistedGrants_SubjectId_SessionId_Type",
table: "IdentityServerPersistedGrants",
columns: new[] { "SubjectId", "SessionId", "Type" });
}
protected override void Down(MigrationBuilder migrationBuilder)
@ -1191,6 +1218,9 @@ namespace MyCompanyName.MyProjectName.Migrations
migrationBuilder.DropTable(
name: "IdentityServerApiResourceClaims");
migrationBuilder.DropTable(
name: "IdentityServerApiResourceProperties");
migrationBuilder.DropTable(
name: "IdentityServerApiResourceScopes");

@ -861,6 +861,25 @@ namespace MyCompanyName.MyProjectName.Migrations
b.ToTable("AbpOrganizationUnitRoles");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.Property<Guid>("ApiResourceId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Key")
.HasColumnType("nvarchar(250)")
.HasMaxLength(250);
b.Property<string>("Value")
.IsRequired()
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
b.HasKey("ApiResourceId", "Key");
b.ToTable("IdentityServerApiResourceProperties");
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResource", b =>
{
b.Property<Guid>("Id")
@ -926,14 +945,14 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Properties")
.HasColumnType("nvarchar(max)");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("bit");
b.HasKey("Id");
b.HasIndex("Name")
.IsUnique();
b.ToTable("IdentityServerApiResources");
});
@ -979,8 +998,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1074,15 +1093,11 @@ namespace MyCompanyName.MyProjectName.Migrations
b.Property<Guid>("ApiScopeId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("Type")
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.HasKey("ApiScopeId", "Name", "Type");
b.HasKey("ApiScopeId", "Type");
b.ToTable("IdentityServerApiScopeClaims");
});
@ -1424,8 +1439,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(4000);
b.Property<string>("Description")
.HasColumnType("nvarchar(2000)")
.HasMaxLength(2000);
.HasColumnType("nvarchar(1000)")
.HasMaxLength(1000);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1466,7 +1481,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<string>("DeviceCode")
.IsRequired()
@ -1482,7 +1498,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("nvarchar(max)");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
@ -1500,8 +1517,7 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("Expiration");
b.HasIndex("UserCode")
.IsUnique();
b.HasIndex("UserCode");
b.ToTable("IdentityServerDeviceFlowCodes");
});
@ -1535,7 +1551,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasMaxLength(50000);
b.Property<string>("Description")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(200)")
.HasMaxLength(200);
b.Property<DateTime?>("Expiration")
.HasColumnType("datetime2");
@ -1548,7 +1565,8 @@ namespace MyCompanyName.MyProjectName.Migrations
.HasColumnType("uniqueidentifier");
b.Property<string>("SessionId")
.HasColumnType("nvarchar(max)");
.HasColumnType("nvarchar(100)")
.HasMaxLength(100);
b.Property<string>("SubjectId")
.HasColumnType("nvarchar(200)")
@ -1565,6 +1583,8 @@ namespace MyCompanyName.MyProjectName.Migrations
b.HasIndex("SubjectId", "ClientId", "Type");
b.HasIndex("SubjectId", "SessionId", "Type");
b.ToTable("IdentityServerPersistedGrants");
});
@ -1935,6 +1955,15 @@ namespace MyCompanyName.MyProjectName.Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceProperty", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.IdentityServer.ApiScopes.ApiResourceClaim", b =>
{
b.HasOne("Volo.Abp.IdentityServer.ApiScopes.ApiResource", null)

Loading…
Cancel
Save