mirror of https://github.com/abpframework/abp.git
30 changed files with 1967 additions and 1460 deletions
@ -1,13 +0,0 @@ |
|||||
<Project> |
|
||||
<PropertyGroup> |
|
||||
<LangVersion>latest</LangVersion> |
|
||||
<Version>0.1.0</Version> |
|
||||
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn> |
|
||||
<AbpProjectType>module</AbpProjectType> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
<ItemGroup> |
|
||||
<PackageReference Include="SourceLink.Create.CommandLine" Version="2.8.3" PrivateAssets="All" /> |
|
||||
</ItemGroup> |
|
||||
|
|
||||
</Project> |
|
||||
@ -1,749 +0,0 @@ |
|||||
using System; |
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
|
||||
|
|
||||
namespace Volo.CmsKit.Migrations |
|
||||
{ |
|
||||
public partial class Initial : Migration |
|
||||
{ |
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpAuditLogs", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
ApplicationName = table.Column<string>(maxLength: 96, nullable: true), |
|
||||
UserId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
TenantName = table.Column<string>(nullable: true), |
|
||||
ImpersonatorUserId = table.Column<Guid>(nullable: true), |
|
||||
ImpersonatorTenantId = table.Column<Guid>(nullable: true), |
|
||||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|
||||
ExecutionDuration = table.Column<int>(nullable: false), |
|
||||
ClientIpAddress = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ClientName = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
ClientId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
CorrelationId = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
BrowserInfo = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
HttpMethod = table.Column<string>(maxLength: 16, nullable: true), |
|
||||
Url = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
Exceptions = table.Column<string>(maxLength: 4000, nullable: true), |
|
||||
Comments = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
HttpStatusCode = table.Column<int>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpClaimTypes", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
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: "AbpOrganizationUnits", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, 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: "AbpPermissionGrants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpPermissionGrants", 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: 40, nullable: true), |
|
||||
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: "AbpSettings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 2048, nullable: false), |
|
||||
ProviderName = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
ProviderKey = table.Column<string>(maxLength: 64, nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpTenants", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, 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: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpTenants", 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>(maxLength: 40, 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: "CmsComments", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityType = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
EntityId = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Text = table.Column<string>(maxLength: 512, nullable: false), |
|
||||
RepliedCommentId = table.Column<Guid>(nullable: true), |
|
||||
CreatorId = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsComments", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsRatings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityType = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
EntityId = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
StarCount = table.Column<short>(nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsUserReactions", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityType = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
EntityId = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
ReactionName = table.Column<string>(maxLength: 32, nullable: false), |
|
||||
CreatorId = table.Column<Guid>(nullable: false), |
|
||||
CreationTime = table.Column<DateTime>(nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsUserReactions", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "CmsUsers", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true), |
|
||||
ConcurrencyStamp = table.Column<string>(maxLength: 40, nullable: true), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
UserName = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Email = table.Column<string>(maxLength: 256, nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
Surname = table.Column<string>(maxLength: 64, nullable: true), |
|
||||
EmailConfirmed = table.Column<bool>(nullable: false, defaultValue: false), |
|
||||
PhoneNumber = table.Column<string>(maxLength: 16, nullable: true), |
|
||||
PhoneNumberConfirmed = table.Column<bool>(nullable: false, defaultValue: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpAuditLogActions", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
AuditLogId = table.Column<Guid>(nullable: false), |
|
||||
ServiceName = table.Column<string>(maxLength: 256, nullable: true), |
|
||||
MethodName = table.Column<string>(maxLength: 128, nullable: true), |
|
||||
Parameters = table.Column<string>(maxLength: 2000, nullable: true), |
|
||||
ExecutionTime = table.Column<DateTime>(nullable: false), |
|
||||
ExecutionDuration = table.Column<int>(nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
|
||||
column: x => x.AuditLogId, |
|
||||
principalTable: "AbpAuditLogs", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateTable( |
|
||||
name: "AbpEntityChanges", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
AuditLogId = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
ChangeTime = table.Column<DateTime>(nullable: false), |
|
||||
ChangeType = table.Column<byte>(nullable: false), |
|
||||
EntityTenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityId = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
EntityTypeFullName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
ExtraProperties = table.Column<string>(nullable: true) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
|
||||
column: x => x.AuditLogId, |
|
||||
principalTable: "AbpAuditLogs", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
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_OrganizationUnitId", |
|
||||
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: "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: "AbpTenantConnectionStrings", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
TenantId = table.Column<Guid>(nullable: false), |
|
||||
Name = table.Column<string>(maxLength: 64, nullable: false), |
|
||||
Value = table.Column<string>(maxLength: 1024, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", |
|
||||
column: x => x.TenantId, |
|
||||
principalTable: "AbpTenants", |
|
||||
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: "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_OrganizationUnitId", |
|
||||
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.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: "AbpEntityPropertyChanges", |
|
||||
columns: table => new |
|
||||
{ |
|
||||
Id = table.Column<Guid>(nullable: false), |
|
||||
TenantId = table.Column<Guid>(nullable: true), |
|
||||
EntityChangeId = table.Column<Guid>(nullable: false), |
|
||||
NewValue = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
OriginalValue = table.Column<string>(maxLength: 512, nullable: true), |
|
||||
PropertyName = table.Column<string>(maxLength: 128, nullable: false), |
|
||||
PropertyTypeFullName = table.Column<string>(maxLength: 64, nullable: false) |
|
||||
}, |
|
||||
constraints: table => |
|
||||
{ |
|
||||
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
|
||||
table.ForeignKey( |
|
||||
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
|
||||
column: x => x.EntityChangeId, |
|
||||
principalTable: "AbpEntityChanges", |
|
||||
principalColumn: "Id", |
|
||||
onDelete: ReferentialAction.Cascade); |
|
||||
}); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpAuditLogActions_AuditLogId", |
|
||||
table: "AbpAuditLogActions", |
|
||||
column: "AuditLogId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", |
|
||||
table: "AbpAuditLogActions", |
|
||||
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
|
||||
table: "AbpAuditLogs", |
|
||||
columns: new[] { "TenantId", "ExecutionTime" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
|
||||
table: "AbpAuditLogs", |
|
||||
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpEntityChanges_AuditLogId", |
|
||||
table: "AbpEntityChanges", |
|
||||
column: "AuditLogId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
|
||||
table: "AbpEntityChanges", |
|
||||
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
|
||||
table: "AbpEntityPropertyChanges", |
|
||||
column: "EntityChangeId"); |
|
||||
|
|
||||
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_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpPermissionGrants", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoleClaims_RoleId", |
|
||||
table: "AbpRoleClaims", |
|
||||
column: "RoleId"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpRoles_NormalizedName", |
|
||||
table: "AbpRoles", |
|
||||
column: "NormalizedName"); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
|
||||
table: "AbpSettings", |
|
||||
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_AbpTenants_Name", |
|
||||
table: "AbpTenants", |
|
||||
column: "Name"); |
|
||||
|
|
||||
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_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
|
||||
table: "AbpUserOrganizationUnits", |
|
||||
columns: new[] { "UserId", "OrganizationUnitId" }); |
|
||||
|
|
||||
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_CmsComments_TenantId_RepliedCommentId", |
|
||||
table: "CmsComments", |
|
||||
columns: new[] { "TenantId", "RepliedCommentId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsComments_TenantId_EntityType_EntityId", |
|
||||
table: "CmsComments", |
|
||||
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
|
||||
table: "CmsRatings", |
|
||||
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", |
|
||||
table: "CmsUserReactions", |
|
||||
columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", |
|
||||
table: "CmsUserReactions", |
|
||||
columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsUsers_TenantId_Email", |
|
||||
table: "CmsUsers", |
|
||||
columns: new[] { "TenantId", "Email" }); |
|
||||
|
|
||||
migrationBuilder.CreateIndex( |
|
||||
name: "IX_CmsUsers_TenantId_UserName", |
|
||||
table: "CmsUsers", |
|
||||
columns: new[] { "TenantId", "UserName" }); |
|
||||
} |
|
||||
|
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
|
||||
{ |
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpAuditLogActions"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpClaimTypes"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpEntityPropertyChanges"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpOrganizationUnitRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpPermissionGrants"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoleClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpSettings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpTenantConnectionStrings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserClaims"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserLogins"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserOrganizationUnits"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUserTokens"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsComments"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsRatings"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsUserReactions"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "CmsUsers"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpEntityChanges"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpTenants"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpOrganizationUnits"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpRoles"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpUsers"); |
|
||||
|
|
||||
migrationBuilder.DropTable( |
|
||||
name: "AbpAuditLogs"); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
File diff suppressed because it is too large
@ -0,0 +1,846 @@ |
|||||
|
using System; |
||||
|
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
|
||||
|
namespace Volo.CmsKit.Migrations |
||||
|
{ |
||||
|
public partial class Initial : Migration |
||||
|
{ |
||||
|
protected override void Up(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
||||
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
TenantName = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ImpersonatorUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ImpersonatorTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
||||
|
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ClientName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
||||
|
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
||||
|
HttpMethod = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
||||
|
Url = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
Exceptions = table.Column<string>(type: "nvarchar(4000)", maxLength: 4000, nullable: true), |
||||
|
Comments = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
HttpStatusCode = table.Column<int>(type: "int", nullable: true), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogs", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpClaimTypes", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
Required = table.Column<bool>(type: "bit", nullable: false), |
||||
|
IsStatic = table.Column<bool>(type: "bit", nullable: false), |
||||
|
Regex = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
||||
|
RegexDescription = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
||||
|
Description = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
ValueType = table.Column<int>(type: "int", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpClaimTypes", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpFeatureValues", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
Value = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpFeatureValues", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpLinkUsers", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
SourceUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
SourceTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
TargetUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TargetTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpLinkUsers", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpOrganizationUnits", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ParentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Code = table.Column<string>(type: "nvarchar(95)", maxLength: 95, nullable: false), |
||||
|
DisplayName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
||||
|
}, |
||||
|
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: "AbpPermissionGrants", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpPermissionGrants", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Name = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
NormalizedName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
IsDefault = table.Column<bool>(type: "bit", nullable: false), |
||||
|
IsStatic = table.Column<bool>(type: "bit", nullable: false), |
||||
|
IsPublic = table.Column<bool>(type: "bit", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpRoles", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpSecurityLogs", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ApplicationName = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
||||
|
Identity = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
||||
|
Action = table.Column<string>(type: "nvarchar(96)", maxLength: 96, nullable: true), |
||||
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
TenantName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ClientId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
CorrelationId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ClientIpAddress = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
BrowserInfo = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpSecurityLogs", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpSettings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
Value = table.Column<string>(type: "nvarchar(2048)", maxLength: 2048, nullable: false), |
||||
|
ProviderName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
ProviderKey = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpSettings", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpTenants", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpTenants", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUsers", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
NormalizedUserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
NormalizedEmail = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
PasswordHash = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
SecurityStamp = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
IsExternal = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
||||
|
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
TwoFactorEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
LockoutEnd = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true), |
||||
|
LockoutEnabled = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
AccessFailedCount = table.Column<int>(type: "int", nullable: false, defaultValue: 0), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true), |
||||
|
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUsers", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "CmsComments", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
Text = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: false), |
||||
|
RepliedCommentId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_CmsComments", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "CmsRatings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
StarCount = table.Column<short>(type: "smallint", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_CmsRatings", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "CmsUserReactions", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
EntityType = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
EntityId = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
ReactionName = table.Column<string>(type: "nvarchar(32)", maxLength: 32, nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_CmsUserReactions", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "CmsUsers", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
UserName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
Email = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
Surname = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true), |
||||
|
EmailConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
PhoneNumber = table.Column<string>(type: "nvarchar(16)", maxLength: 16, nullable: true), |
||||
|
PhoneNumberConfirmed = table.Column<bool>(type: "bit", nullable: false, defaultValue: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true), |
||||
|
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_CmsUsers", x => x.Id); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpAuditLogActions", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
ServiceName = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true), |
||||
|
MethodName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: true), |
||||
|
Parameters = table.Column<string>(type: "nvarchar(2000)", maxLength: 2000, nullable: true), |
||||
|
ExecutionTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ExecutionDuration = table.Column<int>(type: "int", nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpAuditLogActions", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpAuditLogActions_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpEntityChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
AuditLogId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ChangeTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
ChangeType = table.Column<byte>(type: "tinyint", nullable: false), |
||||
|
EntityTenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
EntityId = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
EntityTypeFullName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityChanges_AbpAuditLogs_AuditLogId", |
||||
|
column: x => x.AuditLogId, |
||||
|
principalTable: "AbpAuditLogs", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpOrganizationUnitRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpOrganizationUnitRoles", x => new { x.OrganizationUnitId, x.RoleId }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpOrganizationUnitRoles_AbpOrganizationUnits_OrganizationUnitId", |
||||
|
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: "AbpRoleClaims", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true) |
||||
|
}, |
||||
|
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: "AbpTenantConnectionStrings", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
Value = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId", |
||||
|
column: x => x.TenantId, |
||||
|
principalTable: "AbpTenants", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateTable( |
||||
|
name: "AbpUserClaims", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ClaimType = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false), |
||||
|
ClaimValue = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: true) |
||||
|
}, |
||||
|
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>(type: "uniqueidentifier", nullable: false), |
||||
|
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
ProviderKey = table.Column<string>(type: "nvarchar(196)", maxLength: 196, nullable: false), |
||||
|
ProviderDisplayName = table.Column<string>(type: "nvarchar(128)", 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: "AbpUserOrganizationUnits", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
OrganizationUnitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false), |
||||
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpUserOrganizationUnits", x => new { x.OrganizationUnitId, x.UserId }); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpUserOrganizationUnits_AbpOrganizationUnits_OrganizationUnitId", |
||||
|
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.CreateTable( |
||||
|
name: "AbpUserRoles", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
RoleId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", 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>(type: "uniqueidentifier", nullable: false), |
||||
|
LoginProvider = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false), |
||||
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
Value = table.Column<string>(type: "nvarchar(max)", 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: "AbpEntityPropertyChanges", |
||||
|
columns: table => new |
||||
|
{ |
||||
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true), |
||||
|
EntityChangeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false), |
||||
|
NewValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
||||
|
OriginalValue = table.Column<string>(type: "nvarchar(512)", maxLength: 512, nullable: true), |
||||
|
PropertyName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false), |
||||
|
PropertyTypeFullName = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false) |
||||
|
}, |
||||
|
constraints: table => |
||||
|
{ |
||||
|
table.PrimaryKey("PK_AbpEntityPropertyChanges", x => x.Id); |
||||
|
table.ForeignKey( |
||||
|
name: "FK_AbpEntityPropertyChanges_AbpEntityChanges_EntityChangeId", |
||||
|
column: x => x.EntityChangeId, |
||||
|
principalTable: "AbpEntityChanges", |
||||
|
principalColumn: "Id", |
||||
|
onDelete: ReferentialAction.Cascade); |
||||
|
}); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_AuditLogId", |
||||
|
table: "AbpAuditLogActions", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogActions_TenantId_ServiceName_MethodName_ExecutionTime", |
||||
|
table: "AbpAuditLogActions", |
||||
|
columns: new[] { "TenantId", "ServiceName", "MethodName", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpAuditLogs_TenantId_UserId_ExecutionTime", |
||||
|
table: "AbpAuditLogs", |
||||
|
columns: new[] { "TenantId", "UserId", "ExecutionTime" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_AuditLogId", |
||||
|
table: "AbpEntityChanges", |
||||
|
column: "AuditLogId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityChanges_TenantId_EntityTypeFullName_EntityId", |
||||
|
table: "AbpEntityChanges", |
||||
|
columns: new[] { "TenantId", "EntityTypeFullName", "EntityId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpEntityPropertyChanges_EntityChangeId", |
||||
|
table: "AbpEntityPropertyChanges", |
||||
|
column: "EntityChangeId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpFeatureValues_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpFeatureValues", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpLinkUsers_SourceUserId_SourceTenantId_TargetUserId_TargetTenantId", |
||||
|
table: "AbpLinkUsers", |
||||
|
columns: new[] { "SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId" }, |
||||
|
unique: true, |
||||
|
filter: "[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL"); |
||||
|
|
||||
|
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_AbpPermissionGrants_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpPermissionGrants", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpRoleClaims_RoleId", |
||||
|
table: "AbpRoleClaims", |
||||
|
column: "RoleId"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpRoles_NormalizedName", |
||||
|
table: "AbpRoles", |
||||
|
column: "NormalizedName"); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_Action", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "Action" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_ApplicationName", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "ApplicationName" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_Identity", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "Identity" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSecurityLogs_TenantId_UserId", |
||||
|
table: "AbpSecurityLogs", |
||||
|
columns: new[] { "TenantId", "UserId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpSettings_Name_ProviderName_ProviderKey", |
||||
|
table: "AbpSettings", |
||||
|
columns: new[] { "Name", "ProviderName", "ProviderKey" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_AbpTenants_Name", |
||||
|
table: "AbpTenants", |
||||
|
column: "Name"); |
||||
|
|
||||
|
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_AbpUserOrganizationUnits_UserId_OrganizationUnitId", |
||||
|
table: "AbpUserOrganizationUnits", |
||||
|
columns: new[] { "UserId", "OrganizationUnitId" }); |
||||
|
|
||||
|
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_CmsComments_TenantId_EntityType_EntityId", |
||||
|
table: "CmsComments", |
||||
|
columns: new[] { "TenantId", "EntityType", "EntityId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsComments_TenantId_RepliedCommentId", |
||||
|
table: "CmsComments", |
||||
|
columns: new[] { "TenantId", "RepliedCommentId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsRatings_TenantId_EntityType_EntityId_CreatorId", |
||||
|
table: "CmsRatings", |
||||
|
columns: new[] { "TenantId", "EntityType", "EntityId", "CreatorId" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsUserReactions_TenantId_CreatorId_EntityType_EntityId_ReactionName", |
||||
|
table: "CmsUserReactions", |
||||
|
columns: new[] { "TenantId", "CreatorId", "EntityType", "EntityId", "ReactionName" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsUserReactions_TenantId_EntityType_EntityId_ReactionName", |
||||
|
table: "CmsUserReactions", |
||||
|
columns: new[] { "TenantId", "EntityType", "EntityId", "ReactionName" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsUsers_TenantId_Email", |
||||
|
table: "CmsUsers", |
||||
|
columns: new[] { "TenantId", "Email" }); |
||||
|
|
||||
|
migrationBuilder.CreateIndex( |
||||
|
name: "IX_CmsUsers_TenantId_UserName", |
||||
|
table: "CmsUsers", |
||||
|
columns: new[] { "TenantId", "UserName" }); |
||||
|
} |
||||
|
|
||||
|
protected override void Down(MigrationBuilder migrationBuilder) |
||||
|
{ |
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogActions"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpClaimTypes"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityPropertyChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpFeatureValues"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpLinkUsers"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpOrganizationUnitRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpPermissionGrants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpRoleClaims"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSecurityLogs"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpSettings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenantConnectionStrings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserClaims"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserLogins"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserOrganizationUnits"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUserTokens"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "CmsComments"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "CmsRatings"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "CmsUserReactions"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "CmsUsers"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpEntityChanges"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpTenants"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpOrganizationUnits"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpRoles"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpUsers"); |
||||
|
|
||||
|
migrationBuilder.DropTable( |
||||
|
name: "AbpAuditLogs"); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
File diff suppressed because it is too large
@ -0,0 +1,37 @@ |
|||||
|
.jq-stars { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.jq-rating-label { |
||||
|
font-size: 22px; |
||||
|
display: inline-block; |
||||
|
position: relative; |
||||
|
vertical-align: top; |
||||
|
font-family: helvetica, arial, verdana; |
||||
|
} |
||||
|
|
||||
|
.jq-star { |
||||
|
width: 100px; |
||||
|
height: 100px; |
||||
|
display: inline-block; |
||||
|
cursor: pointer; |
||||
|
} |
||||
|
|
||||
|
.jq-star-svg { |
||||
|
width: 100%; |
||||
|
height: 100% ; |
||||
|
} |
||||
|
|
||||
|
.jq-star:hover .fs-star-svg polygon { |
||||
|
} |
||||
|
|
||||
|
.jq-star-svg polygon { |
||||
|
stroke: #000; |
||||
|
stroke-linejoin: round; |
||||
|
} |
||||
|
|
||||
|
/* un-used */ |
||||
|
.jq-shadow { |
||||
|
-webkit-filter: drop-shadow( -2px -2px 2px #888 ); |
||||
|
filter: drop-shadow( -2px -2px 2px #888 ); |
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
!function(a){"use strict";var b="starRating",c=function(){},d={totalStars:5,useFullStars:!1,emptyColor:"lightgray",hoverColor:"orange",activeColor:"gold",useGradient:!0,readOnly:!1,disableAfterRate:!0,starGradient:{start:"#FEF7CD",end:"#FF9511"},strokeWidth:0,strokeColor:"black",initialRating:0,starSize:40,callback:c,onHover:c,onLeave:c},e=function(c,e){var f;this.element=c,this.$el=a(c),this.settings=a.extend({},d,e),f=this.$el.data("rating")||this.settings.initialRating,this._state={rating:(Math.round(2*f)/2).toFixed(1)},this._uid=Math.floor(999*Math.random()),e.starGradient||this.settings.useGradient||(this.settings.starGradient.start=this.settings.starGradient.end=this.settings.activeColor),this._defaults=d,this._name=b,this.init()},f={init:function(){this.renderMarkup(),this.addListeners(),this.initRating()},addListeners:function(){this.settings.readOnly||(this.$stars.on("mouseover",this.hoverRating.bind(this)),this.$stars.on("mouseout",this.restoreState.bind(this)),this.$stars.on("click",this.handleRating.bind(this)))},hoverRating:function(a){var b=this.getIndex(a);this.paintStars(b,"hovered"),this.settings.onHover(b+1,this._state.rating,this.$el)},handleRating:function(a){var b=this.getIndex(a),c=b+1;this.applyRating(c,this.$el),this.executeCallback(c,this.$el),this.settings.disableAfterRate&&this.$stars.off()},applyRating:function(a){var b=a-1;this.paintStars(b,"active"),this._state.rating=b+1},restoreState:function(a){var b=this.getIndex(a),c=this._state.rating||-1;this.paintStars(c-1,"active"),this.settings.onLeave(b+1,this._state.rating,this.$el)},getIndex:function(b){var c=a(b.currentTarget),d=c.width(),e=a(b.target).attr("data-side");e=e?e:this.getOffsetByPixel(b,c,d),e=this.settings.useFullStars?"right":e;var f=c.index()-("left"===e?.5:0);return f=.5>f&&b.offsetX<d/4?-1:f},getOffsetByPixel:function(a,b,c){var d=a.pageX-b.offset().left;return c/2>=d&&!this.settings.useFullStars?"left":"right"},initRating:function(){this.paintStars(this._state.rating-1,"active")},paintStars:function(b,c){var d,e,f,g;a.each(this.$stars,function(h,i){d=a(i).find('polygon[data-side="left"]'),e=a(i).find('polygon[data-side="right"]'),f=g=b>=h?c:"empty",f=h-b===.5?c:f,d.attr("class","svg-"+f+"-"+this._uid),e.attr("class","svg-"+g+"-"+this._uid)}.bind(this))},renderMarkup:function(){for(var a='<div class="jq-star" style="width:'+this.settings.starSize+"px; height:"+this.settings.starSize+'px;"><svg version="1.0" class="jq-star-svg" shape-rendering="geometricPrecision" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="305px" height="305px" viewBox="60 -62 309 309" style="enable-background:new 64 -59 305 305; stroke-width:'+this.settings.strokeWidth+'px;" xml:space="preserve"><style type="text/css">.svg-empty-'+this._uid+"{fill:url(#"+this._uid+"_SVGID_1_);}.svg-hovered-"+this._uid+"{fill:url(#"+this._uid+"_SVGID_2_);}.svg-active-"+this._uid+"{fill:url(#"+this._uid+"_SVGID_3_);}</style>"+this.getLinearGradient(this._uid+"_SVGID_1_",this.settings.emptyColor,this.settings.emptyColor)+this.getLinearGradient(this._uid+"_SVGID_2_",this.settings.hoverColor,this.settings.hoverColor)+this.getLinearGradient(this._uid+"_SVGID_3_",this.settings.starGradient.start,this.settings.starGradient.end)+'<polygon data-side="left" class="svg-empty-'+this._uid+'" points="281.1,129.8 364,55.7 255.5,46.8 214,-59 172.5,46.8 64,55.4 146.8,129.7 121.1,241 213.9,181.1 213.9,181 306.5,241 " style="stroke: '+this.settings.strokeColor+'"/><polygon data-side="right" class="svg-empty-'+this._uid+'" points="364,55.7 255.5,46.8 214,-59 213.9,181 306.5,241 281.1,129.8 " style="stroke-dasharray: 230 232 210 0; stroke: '+this.settings.strokeColor+'"/></svg></div>',b="",c=0;c<this.settings.totalStars;c++)b+=a;this.$el.append(b),this.$stars=this.$el.find(".jq-star")},getLinearGradient:function(a,b,c){return'<linearGradient id="'+a+'" gradientUnits="userSpaceOnUse" x1="121.1501" y1="-70.35" x2="121.15" y2="125.0045"><stop offset="0" style="stop-color:'+b+'"/><stop offset="1" style="stop-color:'+c+'"/> </linearGradient>'},executeCallback:function(a,b){var c=this.settings.callback;c(a,b)}},g={unload:function(){var c="plugin_"+b,d=a(this),e=d.data(c).$stars;e.off(),d.removeData(c).remove()},setRating:function(c,d){var e="plugin_"+b,f=a(this),g=f.data(e);c>g.settings.totalStars||0>c||(d&&(c=Math.round(c)),g.applyRating(c))},getRating:function(){var c="plugin_"+b,d=a(this),e=d.data(c);return e._state.rating}};a.extend(e.prototype,f),a.fn[b]=function(c){if(!a.isPlainObject(c)){if(g.hasOwnProperty(c))return g[c].apply(this,Array.prototype.slice.call(arguments,1));a.error("Method "+c+" does not exist on "+b+".js")}return this.each(function(){a.data(this,"plugin_"+b)||a.data(this,"plugin_"+b,new e(this,c))})}}(jQuery,window,document); |
||||
@ -1,12 +0,0 @@ |
|||||
<Project> |
|
||||
<PropertyGroup> |
|
||||
<LangVersion>latest</LangVersion> |
|
||||
<Version>0.3.0</Version> |
|
||||
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn> |
|
||||
<PackageIconUrl>http://www.aspnetboilerplate.com/images/abp_nupkg.png</PackageIconUrl> |
|
||||
<PackageProjectUrl>http://abp.io</PackageProjectUrl> |
|
||||
<RepositoryType>git</RepositoryType> |
|
||||
<RepositoryUrl>https://github.com/volosoft/abp/</RepositoryUrl> |
|
||||
</PropertyGroup> |
|
||||
|
|
||||
</Project> |
|
||||
Loading…
Reference in new issue