40 changed files with 5234 additions and 143 deletions
File diff suppressed because it is too large
@ -0,0 +1,773 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace LINGYUN.Platform.Migrations |
|||
{ |
|||
public partial class MigrationIdentityServerMySql : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.CreateTable( |
|||
name: "AbpClaimTypes", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|||
Required = table.Column<bool>(nullable: false), |
|||
IsStatic = table.Column<bool>(nullable: false), |
|||
Regex = table.Column<string>(maxLength: 512, nullable: true), |
|||
RegexDescription = table.Column<string>(maxLength: 128, nullable: true), |
|||
Description = table.Column<string>(maxLength: 256, nullable: true), |
|||
ValueType = table.Column<int>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpRoles", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(maxLength: 256, nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
Name = table.Column<string>(maxLength: 256, nullable: false), |
|||
NormalizedName = table.Column<string>(maxLength: 256, nullable: false), |
|||
IsDefault = table.Column<bool>(nullable: false), |
|||
IsStatic = table.Column<bool>(nullable: false), |
|||
IsPublic = table.Column<bool>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUsers", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
UserName = table.Column<string>(maxLength: 256, nullable: false), |
|||
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: false), |
|||
Name = table.Column<string>(maxLength: 64, nullable: true), |
|||
Surname = table.Column<string>(maxLength: 64, nullable: true), |
|||
Email = table.Column<string>(maxLength: 256, nullable: false), |
|||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: false), |
|||
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|||
PasswordHash = table.Column<string>(maxLength: 256, nullable: true), |
|||
SecurityStamp = table.Column<string>(maxLength: 256, nullable: false), |
|||
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true), |
|||
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|||
TwoFactorEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|||
LockoutEnd = table.Column<DateTimeOffset>(nullable: true), |
|||
LockoutEnabled = table.Column<bool>(nullable: false, defaultValue: false), |
|||
AccessFailedCount = table.Column<int>(nullable: false, defaultValue: 0) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiResources", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|||
Enabled = table.Column<bool>(nullable: false), |
|||
Properties = table.Column<string>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiResources", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClients", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|||
ClientName = table.Column<string>(maxLength: 200, nullable: true), |
|||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|||
ClientUri = table.Column<string>(maxLength: 2000, nullable: true), |
|||
LogoUri = table.Column<string>(maxLength: 2000, nullable: true), |
|||
Enabled = table.Column<bool>(nullable: false), |
|||
ProtocolType = table.Column<string>(maxLength: 200, nullable: false), |
|||
RequireClientSecret = table.Column<bool>(nullable: false), |
|||
RequireConsent = table.Column<bool>(nullable: false), |
|||
AllowRememberConsent = table.Column<bool>(nullable: false), |
|||
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(nullable: false), |
|||
RequirePkce = table.Column<bool>(nullable: false), |
|||
AllowPlainTextPkce = table.Column<bool>(nullable: false), |
|||
AllowAccessTokensViaBrowser = table.Column<bool>(nullable: false), |
|||
FrontChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|||
FrontChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|||
BackChannelLogoutUri = table.Column<string>(maxLength: 2000, nullable: true), |
|||
BackChannelLogoutSessionRequired = table.Column<bool>(nullable: false), |
|||
AllowOfflineAccess = table.Column<bool>(nullable: false), |
|||
IdentityTokenLifetime = table.Column<int>(nullable: false), |
|||
AccessTokenLifetime = table.Column<int>(nullable: false), |
|||
AuthorizationCodeLifetime = table.Column<int>(nullable: false), |
|||
ConsentLifetime = table.Column<int>(nullable: true), |
|||
AbsoluteRefreshTokenLifetime = table.Column<int>(nullable: false), |
|||
SlidingRefreshTokenLifetime = table.Column<int>(nullable: false), |
|||
RefreshTokenUsage = table.Column<int>(nullable: false), |
|||
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(nullable: false), |
|||
RefreshTokenExpiration = table.Column<int>(nullable: false), |
|||
AccessTokenType = table.Column<int>(nullable: false), |
|||
EnableLocalLogin = table.Column<bool>(nullable: false), |
|||
IncludeJwtId = table.Column<bool>(nullable: false), |
|||
AlwaysSendClientClaims = table.Column<bool>(nullable: false), |
|||
ClientClaimsPrefix = table.Column<string>(maxLength: 200, nullable: true), |
|||
PairWiseSubjectSalt = table.Column<string>(maxLength: 200, nullable: true), |
|||
UserSsoLifetime = table.Column<int>(nullable: true), |
|||
UserCodeType = table.Column<string>(maxLength: 100, nullable: true), |
|||
DeviceCodeLifetime = table.Column<int>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClients", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerDeviceFlowCodes", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
DeviceCode = table.Column<string>(maxLength: 200, nullable: false), |
|||
UserCode = table.Column<string>(maxLength: 200, nullable: false), |
|||
SubjectId = table.Column<string>(maxLength: 200, nullable: true), |
|||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|||
Expiration = table.Column<DateTime>(nullable: false), |
|||
Data = table.Column<string>(maxLength: 50000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerDeviceFlowCodes", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerIdentityResources", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|||
Enabled = table.Column<bool>(nullable: false), |
|||
Required = table.Column<bool>(nullable: false), |
|||
Emphasize = table.Column<bool>(nullable: false), |
|||
ShowInDiscoveryDocument = table.Column<bool>(nullable: false), |
|||
Properties = table.Column<string>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerIdentityResources", x => x.Id); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerPersistedGrants", |
|||
columns: table => new |
|||
{ |
|||
Key = table.Column<string>(maxLength: 200, nullable: false), |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
Type = table.Column<string>(maxLength: 50, nullable: false), |
|||
SubjectId = table.Column<string>(maxLength: 200, nullable: true), |
|||
ClientId = table.Column<string>(maxLength: 200, nullable: false), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
Expiration = table.Column<DateTime>(nullable: true), |
|||
Data = table.Column<string>(maxLength: 10000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpRoleClaims", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|||
RoleId = table.Column<Guid>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpRoleClaims", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpRoleClaims_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserClaims", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
ClaimType = table.Column<string>(maxLength: 256, nullable: false), |
|||
ClaimValue = table.Column<string>(maxLength: 1024, nullable: true), |
|||
UserId = table.Column<Guid>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserClaims", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserClaims_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserLogins", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
ProviderKey = table.Column<string>(maxLength: 196, nullable: false), |
|||
ProviderDisplayName = table.Column<string>(maxLength: 128, nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserLogins", x => new { x.UserId, x.LoginProvider }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserLogins_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserRoles", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
RoleId = table.Column<Guid>(nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserRoles", x => new { x.UserId, x.RoleId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserRoles_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserRoles_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserTokens", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
LoginProvider = table.Column<string>(maxLength: 64, nullable: false), |
|||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
Value = table.Column<string>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserTokens", x => new { x.UserId, x.LoginProvider, x.Name }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserTokens_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiClaims", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|||
ApiResourceId = table.Column<Guid>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiClaims", x => new { x.ApiResourceId, x.Type }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiClaims_IdentityServerApiResources_ApiResour~", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiScopes", |
|||
columns: table => new |
|||
{ |
|||
ApiResourceId = table.Column<Guid>(nullable: false), |
|||
Name = table.Column<string>(maxLength: 200, nullable: false), |
|||
DisplayName = table.Column<string>(maxLength: 200, nullable: true), |
|||
Description = table.Column<string>(maxLength: 1000, nullable: true), |
|||
Required = table.Column<bool>(nullable: false), |
|||
Emphasize = table.Column<bool>(nullable: false), |
|||
ShowInDiscoveryDocument = table.Column<bool>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiScopes", x => new { x.ApiResourceId, x.Name }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiScopes_IdentityServerApiResources_ApiResour~", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiSecrets", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(maxLength: 300, nullable: false), |
|||
ApiResourceId = table.Column<Guid>(nullable: false), |
|||
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|||
Expiration = table.Column<DateTime>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiSecrets", x => new { x.ApiResourceId, x.Type, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiSecrets_IdentityServerApiResources_ApiResou~", |
|||
column: x => x.ApiResourceId, |
|||
principalTable: "IdentityServerApiResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientClaims", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(maxLength: 250, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientClaims", x => new { x.ClientId, x.Type, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientClaims_IdentityServerClients_ClientId", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientCorsOrigins", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
Origin = table.Column<string>(maxLength: 150, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientCorsOrigins", x => new { x.ClientId, x.Origin }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientCorsOrigins_IdentityServerClients_Client~", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientGrantTypes", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
GrantType = table.Column<string>(maxLength: 250, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientGrantTypes", x => new { x.ClientId, x.GrantType }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientGrantTypes_IdentityServerClients_ClientId", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientIdPRestrictions", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
Provider = table.Column<string>(maxLength: 200, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientIdPRestrictions", x => new { x.ClientId, x.Provider }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientIdPRestrictions_IdentityServerClients_Cl~", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientPostLogoutRedirectUris", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
PostLogoutRedirectUri = table.Column<string>(maxLength: 300, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerCli~", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientProperties", |
|||
columns: table => new |
|||
{ |
|||
ClientId = 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_IdentityServerClientProperties", x => new { x.ClientId, x.Key }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientProperties_IdentityServerClients_ClientId", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientRedirectUris", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
RedirectUri = table.Column<string>(maxLength: 300, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_Clien~", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientScopes", |
|||
columns: table => new |
|||
{ |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
Scope = table.Column<string>(maxLength: 200, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientScopes", x => new { x.ClientId, x.Scope }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientScopes_IdentityServerClients_ClientId", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerClientSecrets", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(maxLength: 250, nullable: false), |
|||
Value = table.Column<string>(maxLength: 300, nullable: false), |
|||
ClientId = table.Column<Guid>(nullable: false), |
|||
Description = table.Column<string>(maxLength: 2000, nullable: true), |
|||
Expiration = table.Column<DateTime>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientSecrets", x => new { x.ClientId, x.Type, x.Value }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientSecrets_IdentityServerClients_ClientId", |
|||
column: x => x.ClientId, |
|||
principalTable: "IdentityServerClients", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerIdentityClaims", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|||
IdentityResourceId = table.Column<Guid>(nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerIdentityClaims", x => new { x.IdentityResourceId, x.Type }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerIdentityClaims_IdentityServerIdentityResources~", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "IdentityServerApiScopeClaims", |
|||
columns: table => new |
|||
{ |
|||
Type = table.Column<string>(maxLength: 200, nullable: false), |
|||
ApiResourceId = table.Column<Guid>(nullable: false), |
|||
Name = table.Column<string>(maxLength: 200, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerApiScopeClaims", x => new { x.ApiResourceId, x.Name, x.Type }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerApiScopeClaims_IdentityServerApiScopes_ApiReso~", |
|||
columns: x => new { x.ApiResourceId, x.Name }, |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpRoleClaims_RoleId", |
|||
table: "AbpRoleClaims", |
|||
column: "RoleId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpRoles_NormalizedName", |
|||
table: "AbpRoles", |
|||
column: "NormalizedName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserClaims_UserId", |
|||
table: "AbpUserClaims", |
|||
column: "UserId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserLogins_LoginProvider_ProviderKey", |
|||
table: "AbpUserLogins", |
|||
columns: new[] { "LoginProvider", "ProviderKey" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserRoles_RoleId_UserId", |
|||
table: "AbpUserRoles", |
|||
columns: new[] { "RoleId", "UserId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_Email", |
|||
table: "AbpUsers", |
|||
column: "Email"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_NormalizedEmail", |
|||
table: "AbpUsers", |
|||
column: "NormalizedEmail"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_NormalizedUserName", |
|||
table: "AbpUsers", |
|||
column: "NormalizedUserName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUsers_UserName", |
|||
table: "AbpUsers", |
|||
column: "UserName"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerClients_ClientId", |
|||
table: "IdentityServerClients", |
|||
column: "ClientId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_DeviceCode", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
column: "DeviceCode", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_Expiration", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
column: "Expiration"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerDeviceFlowCodes_UserCode", |
|||
table: "IdentityServerDeviceFlowCodes", |
|||
column: "UserCode", |
|||
unique: true); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerPersistedGrants_Expiration", |
|||
table: "IdentityServerPersistedGrants", |
|||
column: "Expiration"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_IdentityServerPersistedGrants_SubjectId_ClientId_Type", |
|||
table: "IdentityServerPersistedGrants", |
|||
columns: new[] { "SubjectId", "ClientId", "Type" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpClaimTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoleClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserLogins"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserTokens"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiScopeClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiSecrets"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientCorsOrigins"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientGrantTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientIdPRestrictions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientPostLogoutRedirectUris"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientProperties"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientRedirectUris"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClientSecrets"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerDeviceFlowCodes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClients"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityResources"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResources"); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,199 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace LINGYUN.Platform.Migrations |
|||
{ |
|||
public partial class UpgradeAbp290 : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Value", |
|||
table: "IdentityServerClientSecrets", |
|||
maxLength: 300, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "longtext CHARACTER SET utf8mb4", |
|||
oldMaxLength: 4000); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "RedirectUri", |
|||
table: "IdentityServerClientRedirectUris", |
|||
maxLength: 300, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "varchar(2000) CHARACTER SET utf8mb4", |
|||
oldMaxLength: 2000); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "PostLogoutRedirectUri", |
|||
table: "IdentityServerClientPostLogoutRedirectUris", |
|||
maxLength: 300, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "varchar(2000) CHARACTER SET utf8mb4", |
|||
oldMaxLength: 2000); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Value", |
|||
table: "IdentityServerApiSecrets", |
|||
maxLength: 300, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldType: "longtext CHARACTER SET utf8mb4", |
|||
oldMaxLength: 4000); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpOrganizationUnits", |
|||
columns: table => new |
|||
{ |
|||
Id = table.Column<Guid>(nullable: false), |
|||
ExtraProperties = table.Column<string>(nullable: true), |
|||
ConcurrencyStamp = table.Column<string>(nullable: true), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
LastModificationTime = table.Column<DateTime>(nullable: true), |
|||
LastModifierId = table.Column<Guid>(nullable: true), |
|||
IsDeleted = table.Column<bool>(nullable: false, defaultValue: false), |
|||
DeleterId = table.Column<Guid>(nullable: true), |
|||
DeletionTime = table.Column<DateTime>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true), |
|||
ParentId = table.Column<Guid>(nullable: true), |
|||
Code = table.Column<string>(maxLength: 95, nullable: false), |
|||
DisplayName = table.Column<string>(maxLength: 128, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpOrganizationUnits", x => x.Id); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnits_AbpOrganizationUnits_ParentId", |
|||
column: x => x.ParentId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Restrict); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpOrganizationUnitRoles", |
|||
columns: table => new |
|||
{ |
|||
RoleId = table.Column<Guid>(nullable: false), |
|||
OrganizationUnitId = table.Column<Guid>(nullable: false), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUn~", |
|||
column: x => x.OrganizationUnitId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpOrganizationUnitRoles_AbpRoles_RoleId", |
|||
column: x => x.RoleId, |
|||
principalTable: "AbpRoles", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateTable( |
|||
name: "AbpUserOrganizationUnits", |
|||
columns: table => new |
|||
{ |
|||
UserId = table.Column<Guid>(nullable: false), |
|||
OrganizationUnitId = table.Column<Guid>(nullable: false), |
|||
CreationTime = table.Column<DateTime>(nullable: false), |
|||
CreatorId = table.Column<Guid>(nullable: true), |
|||
TenantId = table.Column<Guid>(nullable: true) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUn~", |
|||
column: x => x.OrganizationUnitId, |
|||
principalTable: "AbpOrganizationUnits", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
table.ForeignKey( |
|||
name: "FK_AbpUserOrganizationUnits_AbpUsers_UserId", |
|||
column: x => x.UserId, |
|||
principalTable: "AbpUsers", |
|||
principalColumn: "Id", |
|||
onDelete: ReferentialAction.Cascade); |
|||
}); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnitRoles_RoleId_OrganizationUnitId", |
|||
table: "AbpOrganizationUnitRoles", |
|||
columns: new[] { "RoleId", "OrganizationUnitId" }); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnits_Code", |
|||
table: "AbpOrganizationUnits", |
|||
column: "Code"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpOrganizationUnits_ParentId", |
|||
table: "AbpOrganizationUnits", |
|||
column: "ParentId"); |
|||
|
|||
migrationBuilder.CreateIndex( |
|||
name: "IX_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
|||
table: "AbpUserOrganizationUnits", |
|||
columns: new[] { "UserId", "OrganizationUnitId" }); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropTable( |
|||
name: "AbpOrganizationUnitRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUserOrganizationUnits"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpOrganizationUnits"); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Value", |
|||
table: "IdentityServerClientSecrets", |
|||
type: "longtext CHARACTER SET utf8mb4", |
|||
maxLength: 4000, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldMaxLength: 300); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "RedirectUri", |
|||
table: "IdentityServerClientRedirectUris", |
|||
type: "varchar(2000) CHARACTER SET utf8mb4", |
|||
maxLength: 2000, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldMaxLength: 300); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "PostLogoutRedirectUri", |
|||
table: "IdentityServerClientPostLogoutRedirectUris", |
|||
type: "varchar(2000) CHARACTER SET utf8mb4", |
|||
maxLength: 2000, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldMaxLength: 300); |
|||
|
|||
migrationBuilder.AlterColumn<string>( |
|||
name: "Value", |
|||
table: "IdentityServerApiSecrets", |
|||
type: "longtext CHARACTER SET utf8mb4", |
|||
maxLength: 4000, |
|||
nullable: false, |
|||
oldClrType: typeof(string), |
|||
oldMaxLength: 300); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,29 @@ |
|||
@echo off |
|||
cls |
|||
chcp 65001 |
|||
|
|||
echo. 启动消息服务 |
|||
|
|||
cd .\messages\LINGYUN.Abp.MessageService.HttpApi.Host |
|||
|
|||
if '%1' equ '--publish' goto publish |
|||
if '%1' equ '--run' goto run |
|||
if '%1' equ '--restore' goto restore |
|||
if '%1' equ '' goto run |
|||
exit |
|||
|
|||
:publish |
|||
dotnet publish -c Release -o ..\..\Publish\messages --no-cache --no-restore |
|||
copy Dockerfile ..\..\Publish\messages\Dockerfile |
|||
pause |
|||
exit |
|||
|
|||
:run |
|||
dotnet run |
|||
pause |
|||
exit |
|||
|
|||
:restore |
|||
dotnet restore |
|||
pause |
|||
exit |
|||
Loading…
Reference in new issue