mirror of https://github.com/abpframework/abp.git
95 changed files with 7812 additions and 6134 deletions
@ -0,0 +1,64 @@ |
|||
# 连接字符串 |
|||
|
|||
ABP框架的设计是[模块化](Module-Development-Basics.md), [微服务兼容](Microservice-Architecture.md) 和 [多租户](Multi-Tenancy.md). 同时设计了连接字符串管理来支持这些场景; |
|||
|
|||
* 允许为每个模块设置单独的连接字符串,这样每个模块都可以有自己的物理数据库. 甚至可以将模块配置为使用不同的DBMS. |
|||
* 允许为每个租户设置单独的连接字符串使用单独的数据库(在SaaS应用程序中). |
|||
|
|||
它还支持混合场景; |
|||
|
|||
* 允许将模块分组到数据库 (所有的模块分组到一个共享数据库, 两个模块使用数据库A, 3个模块使用数据库B, 一个数据库使用数据库C其余的数据库使用数据库D...等.) |
|||
* 允许将租户分组到数据库中,像模块一样. |
|||
* 允许为每个租户每个模块分离数据库 (数据库过多会增加维护成本,但ABP框架支持这种需求). |
|||
|
|||
所有[预构建应用模块](Modules/Index.md)已设计为与以上场景兼容. |
|||
|
|||
## 配置连接字符串 |
|||
|
|||
参见以下配置: |
|||
|
|||
````json |
|||
"ConnectionStrings": { |
|||
"Default": "Server=localhost;Database=MyMainDb;Trusted_Connection=True;", |
|||
"AbpIdentityServer": "Server=localhost;Database=MyIdsDb;Trusted_Connection=True;", |
|||
"AbpPermissionManagement": "Server=localhost;Database=MyPermissionDb;Trusted_Connection=True;" |
|||
} |
|||
```` |
|||
|
|||
> ABP使用 `IConfiguration` 服务获取应用程序配置. 虽然在 `appsettings.json` 文件中写入配置是最简单的方法, 但它不仅限于此文件. 你可以使用环境变量, user secrets, Azure Key Vault... 等. 更多信息参阅 [配置](Configuration.md) 文档. |
|||
|
|||
以上配置定义了三个不同的连接字符串: |
|||
|
|||
* `MyMainDb` (`Default` 连接字符串)是应用程序的主连接字符串. 如果没有为模块指定连接字符串,则回退到 `Default` 连接字符串. [应用程序启动模板](Startup-Templates/Application.md) 配置为使用单个字符串, 所以所有的模块都使用单个数据库. |
|||
* `MyIdsDb` 由 [IdentityServer](Modules/IdentityServer.md) 模块使用. |
|||
* `MyPermissionDb` 由 [权限管理](Modules/Permission-Management.md) 模块使用. |
|||
|
|||
[预构建的应用程序模块](Modules/Index.md) 为连接字符串名称定义常量. 例如IdentityServer模块在 `AbpIdentityServerDbProperties` 类(位于 `Volo.Abp.IdentityServer` 命名空间)定义了 `ConnectionStringName` 常量 . 其他的模块类似的定义常量,你可以查看连接字符串的名称. |
|||
|
|||
## 设置连接字符串名称 |
|||
|
|||
模块通常使用 `ConnectionStringName` attribute 为 `DbContext` 类关联一个唯一的连接字符串名称. 示例: |
|||
|
|||
````csharp |
|||
[ConnectionStringName("AbpIdentityServer")] |
|||
public class IdentityServerDbContext |
|||
: AbpDbContext<IdentityServerDbContext>, IIdentityServerDbContext |
|||
{ |
|||
} |
|||
```` |
|||
|
|||
对于 [Entity Framework Core](Entity-Framework-Core.md) 和 [MongoDB](MongoDB.md), 写入到 `DbContext` 类 (和接口,如果有的话). |
|||
|
|||
> 如果你开发的是与数据库提供程序无关的可重用模块, 请参见 [最佳实践指南](Best-Practices/Index.md). |
|||
|
|||
## Entity Framework Core的数据库迁移 |
|||
|
|||
关系数据库需要在使用数据库之前创建数据库和数据库架构 (表, 视图...等). |
|||
|
|||
启动模板(使用 EF Core ORM) 带有一个数据库和一个 `.EntityFrameworkCore.DbMigrations` 项目,其中包含数据库的迁移文件. 该项目主要定义了一个*YourProjectName*MigrationsDbContext,它调用所有模块的 `Configure...()` 方法,例如 `builder.ConfigurePermissionManagement()`. |
|||
|
|||
一旦要分离模块的数据库,通常需要创建第二个迁移路径. 最简单的方法是创建一个带有 `DbContext` 的 `.EntityFrameworkCore.DbMigrations` 项目副本, 更改为只调用需要存储在第二个数据库中的模块的 `Configure...()` 方法并重新创建迁移. 这时你还需要更改 `.DbMigrator` 应用程序使其兼容第二个数据库,这样每个数据库将有一个单独的迁移DbContext. |
|||
|
|||
## 多租户 |
|||
|
|||
参阅 [多租户文档](Multi-Tenancy.md)了解如何为租户使用单独的数据库. |
|||
@ -1,3 +1,84 @@ |
|||
# Setting Management Module |
|||
# 设置管理模块 |
|||
|
|||
TODO |
|||
设置管理模块实现了 `ISettingStore` (参阅 [设置系统](../Settings.md)) 将设置值存储在数据库中, 并提供 `ISettingManager` 管理 (更改) 数据库中设置值的功能. |
|||
|
|||
> [启动模板](../Startup-Templates/Index.md)默认安装并配置了设置管理模块. 大部分情况下你不需要手动的添加该到模块到应用程序中. |
|||
|
|||
## ISettingManager |
|||
|
|||
`ISettingManager` 用于获取和设定设置值. 示例: |
|||
|
|||
````csharp |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp.DependencyInjection; |
|||
using Volo.Abp.SettingManagement; |
|||
|
|||
namespace Demo |
|||
{ |
|||
public class MyService : ITransientDependency |
|||
{ |
|||
private readonly ISettingManager _settingManager; |
|||
|
|||
//Inject ISettingManager service |
|||
public MyService(ISettingManager settingManager) |
|||
{ |
|||
_settingManager = settingManager; |
|||
} |
|||
|
|||
public async Task FooAsync() |
|||
{ |
|||
Guid user1Id = ...; |
|||
Guid tenant1Id = ...; |
|||
|
|||
//Get/set a setting value for the current user or the specified user |
|||
|
|||
string layoutType1 = |
|||
await _settingManager.GetOrNullForCurrentUserAsync("App.UI.LayoutType"); |
|||
string layoutType2 = |
|||
await _settingManager.GetOrNullForUserAsync("App.UI.LayoutType", user1Id); |
|||
|
|||
await _settingManager.SetForCurrentUserAsync("App.UI.LayoutType", "LeftMenu"); |
|||
await _settingManager.SetForUserAsync(user1Id, "App.UI.LayoutType", "LeftMenu"); |
|||
|
|||
//Get/set a setting value for the current tenant or the specified tenant |
|||
|
|||
string layoutType3 = |
|||
await _settingManager.GetOrNullForCurrentTenantAsync("App.UI.LayoutType"); |
|||
string layoutType4 = |
|||
await _settingManager.GetOrNullForTenantAsync("App.UI.LayoutType", tenant1Id); |
|||
|
|||
await _settingManager.SetForCurrentTenantAsync("App.UI.LayoutType", "LeftMenu"); |
|||
await _settingManager.SetForTenantAsync(tenant1Id, "App.UI.LayoutType", "LeftMenu"); |
|||
|
|||
//Get/set a global and default setting value |
|||
|
|||
string layoutType5 = |
|||
await _settingManager.GetOrNullGlobalAsync("App.UI.LayoutType"); |
|||
string layoutType6 = |
|||
await _settingManager.GetOrNullDefaultAsync("App.UI.LayoutType"); |
|||
|
|||
await _settingManager.SetGlobalAsync("App.UI.LayoutType", "TopMenu"); |
|||
} |
|||
} |
|||
} |
|||
|
|||
```` |
|||
|
|||
你可以从不同的设置值提供程序中(默认,全局,用户,租户...等)中获取或设定设置值. |
|||
|
|||
### Setting Cache |
|||
|
|||
设置值缓存在 [分布式缓存](../Caching.md) 系统中. 建议始终使用 `ISettingManager` 更改设置值. |
|||
|
|||
## Setting Management Providers |
|||
|
|||
设置管理模块是可扩展的,像[设置系统](../Settings.md)一样. 你可以通过自定义设置管理提供程序进行扩展. 有5个预构建的设置管理程序程序按以下顺序注册: |
|||
|
|||
* `DefaultValueSettingManagementProvider`: 从设置定义的默认值中获取值,由于默认值是硬编码在设置定义上的,所以无法更改默认值. |
|||
* `ConfigurationSettingManagementProvider`:从 [IConfiguration 服务](../Configuration.md)中获取值. 由于无法在运行时更改配置值,所以无法更改配置值. |
|||
* `GlobalSettingManagementProvider`: 获取或设定设置的全局 (系统范围)值. |
|||
* `TenantSettingManagementProvider`: 获取或设定租户的设置值. |
|||
* `UserSettingManagementProvider`: 获取或设定用户的设置值. |
|||
|
|||
`ISettingManager` 在 `get/set` 方法中使用设置管理提供程序. 通常每个设置程序提供程序都在 `ISettingManagement` 服务上定义了模块方法 (比如用户设置管理程序提供定义了 `SetForUserAsync` 方法). |
|||
@ -1,319 +0,0 @@ |
|||
@page |
|||
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
|||
@using Microsoft.AspNetCore.Authorization |
|||
@using Microsoft.AspNetCore.Http.Extensions |
|||
@using Volo.Abp.Users |
|||
@using Volo.Blogging |
|||
@using Volo.Blogging.Pages.Blog.Posts |
|||
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers |
|||
@inject IAuthorizationService Authorization |
|||
@model DetailModel |
|||
@{ |
|||
ViewBag.PageTitle = "Blog"; |
|||
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy! |
|||
} |
|||
@section scripts { |
|||
<abp-script-bundle name="@typeof(DetailModel).FullName"> |
|||
<abp-script src="/Pages/Blog/Posts/detail.js" /> |
|||
</abp-script-bundle> |
|||
} |
|||
@section styles { |
|||
<abp-style-bundle name="@typeof(DetailModel).FullName"> |
|||
<abp-style src="/Pages/Blog/Shared/Styles/blog.css" /> |
|||
</abp-style-bundle> |
|||
} |
|||
|
|||
<div class="vs-blog vs-blog-detail"> |
|||
<abp-input asp-for="FocusCommentId" class="m-0" /> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
<section class="hero-section"> |
|||
<div class="hero-articles"> |
|||
<div class="hero-content"> |
|||
<h1 class="mb-3"> |
|||
<a asp-page="./Detail" asp-route-postUrl="@Model.Post.Url" asp-route-blogShortName="@Model.BlogShortName">@Model.Post.Title</a> |
|||
</h1> |
|||
|
|||
<div class="article-owner"> |
|||
<div class="article-infos"> |
|||
<div class="user-card mt-3 mb-4"> |
|||
<div class="row"> |
|||
<div class="col-auto pr-1"> |
|||
@if (Model.Post.Writer != null) |
|||
{ |
|||
<img gravatar-email="@Model.Post.Writer.Email" default-image="Identicon" class="article-avatar" /> |
|||
} |
|||
</div> |
|||
<div class="col pl-1"> |
|||
@if (Model.Post.Writer != null) |
|||
{ |
|||
<h5 class="mt-2 mb-1">@(Model.Post.Writer.UserName) <span>@ConvertDatetimeToTimeAgo(Model.Post.CreationTime)</span></h5> |
|||
|
|||
} |
|||
|
|||
<i class="fa fa-eye"></i> @L["WiewsWithCount", @Model.Post.ReadCount] |
|||
<span class="vs-seperator">|</span> |
|||
<i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount] |
|||
|
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Update)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a asp-page="./Edit" asp-route-postId="@Model.Post.Id" asp-route-blogShortName="@Model.BlogShortName"> |
|||
<i class="fa fa-pencil"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" id="DeletePostLink" data-postid="@Model.Post.Id" data-blogShortName="@Model.BlogShortName"> |
|||
<i class="fa fa-trash"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="img-container mb-3"> |
|||
<img src="@Model.Post.CoverImage" /> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
<section class="post-content"> |
|||
<p> |
|||
@Html.Raw(RenderMarkdownToHtml(Model.Post.Content)) |
|||
</p> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
@if (Model.Post.Tags.Count > 0) |
|||
{ |
|||
<div class="tags"> |
|||
<h5>@L["TagsInThisArticle"]</h5> |
|||
@foreach (var tag in Model.Post.Tags) |
|||
{ |
|||
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a> |
|||
} |
|||
</div> |
|||
} |
|||
|
|||
|
|||
@if (Model.CommentsWithReplies.Count > 0) |
|||
{ |
|||
<abp-row v-align="Start"> |
|||
<abp-column size-sm="_12"> |
|||
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p> |
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a> |
|||
} |
|||
else |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a> |
|||
} |
|||
</abp-column> |
|||
</abp-row> |
|||
} |
|||
|
|||
<div class="comment-area"> |
|||
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies) |
|||
{ |
|||
<div class="media"> |
|||
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|||
<div class="media-body"> |
|||
<h5 class="comment-owner"> |
|||
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) |
|||
<span>@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span> |
|||
</h5> |
|||
<p id="@commentWithRepliesDto.Comment.Id"> |
|||
@commentWithRepliesDto.Comment.Text |
|||
</p> |
|||
<div class="comment-buttons"> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
</div> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4 replyForm"> |
|||
<div class="clearfix p-4"> |
|||
<h3 class="mt-0"> |
|||
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|||
|
|||
</h3> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
|
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<div class="comment-form mt-4 editForm"> |
|||
<div class="clearfix p-4"> |
|||
<div> |
|||
<form class="editFormClass"> |
|||
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
@foreach (var reply in commentWithRepliesDto.Replies) |
|||
{ |
|||
<div class="media"> |
|||
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|||
<div class="media-body"> |
|||
<h5 class="comment-owner"> |
|||
@(reply.Writer == null ? "" : reply.Writer.UserName) |
|||
<span>@ConvertDatetimeToTimeAgo(reply.CreationTime)</span> |
|||
</h5> |
|||
<p id="@reply.Id"> |
|||
@reply.Text |
|||
</p> |
|||
<div class="comment-buttons"> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|||
</a> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id"> |
|||
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag updateLink" data-updateid="@reply.Id"> |
|||
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
</div> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4 replyForm"> |
|||
<div class="clearfix bg-light p-4"> |
|||
<h3 class="mt-0"> |
|||
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|||
</h3> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<div class="comment-form mt-4 editForm"> |
|||
<div class="clearfix bg-light p-4"> |
|||
<div> |
|||
<form class="editFormClass"> |
|||
<input name="commentId" value="@reply.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4" id="LeaveComment"> |
|||
<div class="vs-blog-title mb-0"> |
|||
<h3>@L["LeaveComment"]</h3> |
|||
</div> |
|||
<div class="clearfix bg-light p-4"> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" id="repliedCommentId" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
else |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active mt-3" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a> |
|||
} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
@ -0,0 +1,319 @@ |
|||
@page |
|||
@inherits Volo.Blogging.Pages.Blog.BloggingPage |
|||
@using Microsoft.AspNetCore.Authorization |
|||
@using Microsoft.AspNetCore.Http.Extensions |
|||
@using Volo.Abp.Users |
|||
@using Volo.Blogging |
|||
@using Volo.Blogging.Pages.Blog.Posts |
|||
@using Volo.Blogging.Areas.Blog.Helpers.TagHelpers |
|||
@inject IAuthorizationService Authorization |
|||
@model DetailModel |
|||
@{ |
|||
ViewBag.PageTitle = Model.Post.Title; |
|||
var hasCommentingPermission = CurrentUser.IsAuthenticated; //TODO: Apply real policy! |
|||
} |
|||
@section scripts { |
|||
<abp-script-bundle name="@typeof(DetailModel).FullName"> |
|||
<abp-script src="/Pages/Blogs/Posts/detail.js" /> |
|||
</abp-script-bundle> |
|||
} |
|||
@section styles { |
|||
<abp-style-bundle name="@typeof(DetailModel).FullName"> |
|||
<abp-style src="/Pages/Blogs/Shared/Styles/blog.css" /> |
|||
</abp-style-bundle> |
|||
} |
|||
|
|||
<div class="vs-blog vs-blog-detail"> |
|||
<abp-input asp-for="FocusCommentId" class="m-0" /> |
|||
<div class="container"> |
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
<section class="hero-section"> |
|||
<div class="hero-articles"> |
|||
<div class="hero-content"> |
|||
<h1 class="mb-3"> |
|||
<a asp-page="./Detail" asp-route-postUrl="@Model.Post.Url" asp-route-blogShortName="@Model.BlogShortName">@Model.Post.Title</a> |
|||
</h1> |
|||
|
|||
<div class="article-owner"> |
|||
<div class="article-infos"> |
|||
<div class="user-card mt-3 mb-4"> |
|||
<div class="row"> |
|||
<div class="col-auto pr-1"> |
|||
@if (Model.Post.Writer != null) |
|||
{ |
|||
<img gravatar-email="@Model.Post.Writer.Email" default-image="Identicon" class="article-avatar" /> |
|||
} |
|||
</div> |
|||
<div class="col pl-1"> |
|||
@if (Model.Post.Writer != null) |
|||
{ |
|||
<h5 class="mt-2 mb-1">@(Model.Post.Writer.UserName) <span>@ConvertDatetimeToTimeAgo(Model.Post.CreationTime)</span></h5> |
|||
|
|||
} |
|||
|
|||
<i class="fa fa-eye"></i> @L["WiewsWithCount", @Model.Post.ReadCount] |
|||
<span class="vs-seperator">|</span> |
|||
<i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount] |
|||
|
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Update)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a asp-page="./Edit" asp-route-postId="@Model.Post.Id" asp-route-blogShortName="@Model.BlogShortName"> |
|||
<i class="fa fa-pencil"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Posts.Delete) || (CurrentUser.Id.HasValue && CurrentUser.Id == Model.Post.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" id="DeletePostLink" data-postid="@Model.Post.Id" data-blogShortName="@Model.BlogShortName"> |
|||
<i class="fa fa-trash"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div class="img-container mb-3"> |
|||
<img src="@Model.Post.CoverImage" /> |
|||
</div> |
|||
</div> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
<section class="post-content"> |
|||
<p> |
|||
@Html.Raw(RenderMarkdownToHtml(Model.Post.Content)) |
|||
</p> |
|||
</section> |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="row"> |
|||
<div class="col-md-8 col-lg-8 mx-auto"> |
|||
@if (Model.Post.Tags.Count > 0) |
|||
{ |
|||
<div class="tags"> |
|||
<h5>@L["TagsInThisArticle"]</h5> |
|||
@foreach (var tag in Model.Post.Tags) |
|||
{ |
|||
<a asp-page="/Blog/Posts/Index" asp-route-blogShortName="@Model.BlogShortName" asp-route-tagName="@tag.Name" class="tag">@tag.Name</a> |
|||
} |
|||
</div> |
|||
} |
|||
|
|||
|
|||
@if (Model.CommentsWithReplies.Count > 0) |
|||
{ |
|||
<abp-row v-align="Start"> |
|||
<abp-column size-sm="_12"> |
|||
<p class="float-left"><i class="fa fa-comment"></i> @L["CommentWithCount", @Model.CommentCount]</p> |
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active" href="#LeaveComment">@L["LeaveComment"]</a> |
|||
} |
|||
else |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a> |
|||
} |
|||
</abp-column> |
|||
</abp-row> |
|||
|
|||
<div class="comment-area"> |
|||
@foreach (var commentWithRepliesDto in Model.CommentsWithReplies) |
|||
{ |
|||
<div class="media"> |
|||
<img gravatar-email="@commentWithRepliesDto.Comment.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|||
<div class="media-body"> |
|||
<h5 class="comment-owner"> |
|||
@(commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName) |
|||
<span>@ConvertDatetimeToTimeAgo(commentWithRepliesDto.Comment.CreationTime)</span> |
|||
</h5> |
|||
<p id="@commentWithRepliesDto.Comment.Id"> |
|||
@commentWithRepliesDto.Comment.Text |
|||
</p> |
|||
<div class="comment-buttons"> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag deleteLink" data-deleteid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag updateLink" data-updateid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
</div> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4 replyForm"> |
|||
<div class="clearfix p-4"> |
|||
<h3 class="mt-0"> |
|||
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|||
|
|||
</h3> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
|
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Comment"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<div class="comment-form mt-4 editForm"> |
|||
<div class="clearfix p-4"> |
|||
<div> |
|||
<form class="editFormClass"> |
|||
<input name="commentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@commentWithRepliesDto.Comment.Text</textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
|
|||
@foreach (var reply in commentWithRepliesDto.Replies) |
|||
{ |
|||
<div class="media"> |
|||
<img gravatar-email="@reply.Writer.Email" default-image="Identicon" class="d-flex mr-3 rounded-circle comment-avatar" /> |
|||
<div class="media-body"> |
|||
<h5 class="comment-owner"> |
|||
@(reply.Writer == null ? "" : reply.Writer.UserName) |
|||
<span>@ConvertDatetimeToTimeAgo(reply.CreationTime)</span> |
|||
</h5> |
|||
<p id="@reply.Id"> |
|||
@reply.Text |
|||
</p> |
|||
<div class="comment-buttons"> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<a href="#" class="tag replyLink" data-relpyid="@commentWithRepliesDto.Comment.Id"> |
|||
<i class="fa fa-reply" aria-hidden="true"></i> @L["Reply"] |
|||
</a> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Delete) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag deleteLink" data-deleteid="@reply.Id"> |
|||
<i class="fa fa-trash" aria-hidden="true"></i> @L["Delete"] |
|||
</a> |
|||
} |
|||
|
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<span class="seperator">|</span> |
|||
<a href="#" class="tag updateLink" data-updateid="@reply.Id"> |
|||
<i class="fa fa-pencil" aria-hidden="true"></i> @L["Edit"] |
|||
</a> |
|||
} |
|||
</div> |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4 replyForm"> |
|||
<div class="clearfix bg-light p-4"> |
|||
<h3 class="mt-0"> |
|||
@L["ReplyTo", commentWithRepliesDto.Comment.Writer == null ? "" : commentWithRepliesDto.Comment.Writer.UserName] |
|||
</h3> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" value="@commentWithRepliesDto.Comment.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right replyCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
@if (await Authorization.IsGrantedAsync(BloggingPermissions.Comments.Update) || (CurrentUser.Id == commentWithRepliesDto.Comment.CreatorId)) |
|||
{ |
|||
<div class="comment-form mt-4 editForm"> |
|||
<div class="clearfix bg-light p-4"> |
|||
<div> |
|||
<form class="editFormClass"> |
|||
<input name="commentId" value="@reply.Id" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4">@reply.Text</textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
<abp-button button-type="Danger" class="btn-rounded float-right editCancelButton" text="@L["Cancel"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
</div> |
|||
} |
|||
</div> |
|||
} |
|||
|
|||
@if (hasCommentingPermission) |
|||
{ |
|||
<div class="comment-form mt-4" id="LeaveComment"> |
|||
<div class="vs-blog-title mb-0"> |
|||
<h3>@L["LeaveComment"]</h3> |
|||
</div> |
|||
<div class="clearfix bg-light p-4"> |
|||
<div> |
|||
<form method="post"> |
|||
<input name="postId" value="@Model.Post.Id" hidden /> |
|||
<input name="repliedCommentId" id="repliedCommentId" hidden /> |
|||
<div class="form-group"> |
|||
<textarea class="form-control no-border" name="text" id="textBoxId" rows="4"></textarea> |
|||
</div> |
|||
<abp-button button-type="Primary" class="btn-rounded float-right" type="submit" text="@L["Submit"].Value" /> |
|||
</form> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
} |
|||
else |
|||
{ |
|||
<a abp-button="Primary" class="btn-rounded float-right active mt-3" href="/Account/Login?returnUrl=@Request.GetEncodedPathAndQuery()">@L["LeaveComment"]</a> |
|||
} |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,982 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace Acme.BookStore.BookManagement.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>(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: 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: "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: 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: "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>(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>(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: true), |
|||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), |
|||
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: "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: 50000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); |
|||
}); |
|||
|
|||
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: "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: "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_ApiResourceId", |
|||
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_ApiResourceId", |
|||
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: 4000, 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_ApiResourceId", |
|||
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_ClientId", |
|||
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_ClientId", |
|||
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: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", |
|||
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: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", |
|||
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: 4000, 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_IdentityResourceId", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
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.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_ApiResourceId_Name", |
|||
columns: x => new { x.ApiResourceId, x.Name }, |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|||
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_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", |
|||
unique: true); |
|||
|
|||
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_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: "AbpAuditLogActions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpClaimTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityPropertyChanges"); |
|||
|
|||
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: "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: "IdentityServerIdentityClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpTenants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClients"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityResources"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResources"); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -1,716 +0,0 @@ |
|||
// <auto-generated />
|
|||
using System; |
|||
using Microsoft.EntityFrameworkCore; |
|||
using Microsoft.EntityFrameworkCore.Infrastructure; |
|||
using Microsoft.EntityFrameworkCore.Metadata; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
|||
using Acme.BookStore.BookManagement.EntityFrameworkCore; |
|||
|
|||
namespace Acme.BookStore.BookManagement.Migrations |
|||
{ |
|||
[DbContext(typeof(UnifiedDbContext))] |
|||
[Migration("20190527144415_Initial")] |
|||
partial class Initial |
|||
{ |
|||
protected override void BuildTargetModel(ModelBuilder modelBuilder) |
|||
{ |
|||
#pragma warning disable 612, 618
|
|||
modelBuilder |
|||
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062") |
|||
.HasAnnotation("Relational:MaxIdentifierLength", 128) |
|||
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ApplicationName") |
|||
.HasColumnName("ApplicationName") |
|||
.HasMaxLength(96); |
|||
|
|||
b.Property<string>("BrowserInfo") |
|||
.HasColumnName("BrowserInfo") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("ClientId") |
|||
.HasColumnName("ClientId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientIpAddress") |
|||
.HasColumnName("ClientIpAddress") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ClientName") |
|||
.HasColumnName("ClientName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Comments") |
|||
.HasColumnName("Comments") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ConcurrencyStamp"); |
|||
|
|||
b.Property<string>("CorrelationId") |
|||
.HasColumnName("CorrelationId") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Exceptions") |
|||
.HasColumnName("Exceptions") |
|||
.HasMaxLength(4000); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("HttpMethod") |
|||
.HasColumnName("HttpMethod") |
|||
.HasMaxLength(16); |
|||
|
|||
b.Property<int?>("HttpStatusCode") |
|||
.HasColumnName("HttpStatusCode"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorTenantId") |
|||
.HasColumnName("ImpersonatorTenantId"); |
|||
|
|||
b.Property<Guid?>("ImpersonatorUserId") |
|||
.HasColumnName("ImpersonatorUserId"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<string>("TenantName"); |
|||
|
|||
b.Property<string>("Url") |
|||
.HasColumnName("Url") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("UserId") |
|||
.HasColumnName("UserId"); |
|||
|
|||
b.Property<string>("UserName") |
|||
.HasColumnName("UserName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("TenantId", "ExecutionTime"); |
|||
|
|||
b.HasIndex("TenantId", "UserId", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogs"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<int>("ExecutionDuration") |
|||
.HasColumnName("ExecutionDuration"); |
|||
|
|||
b.Property<DateTime>("ExecutionTime") |
|||
.HasColumnName("ExecutionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<string>("MethodName") |
|||
.HasColumnName("MethodName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("Parameters") |
|||
.HasColumnName("Parameters") |
|||
.HasMaxLength(2000); |
|||
|
|||
b.Property<string>("ServiceName") |
|||
.HasColumnName("ServiceName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime"); |
|||
|
|||
b.ToTable("AbpAuditLogActions"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("AuditLogId") |
|||
.HasColumnName("AuditLogId"); |
|||
|
|||
b.Property<DateTime>("ChangeTime") |
|||
.HasColumnName("ChangeTime"); |
|||
|
|||
b.Property<byte>("ChangeType") |
|||
.HasColumnName("ChangeType"); |
|||
|
|||
b.Property<string>("EntityId") |
|||
.IsRequired() |
|||
.HasColumnName("EntityId") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<Guid?>("EntityTenantId"); |
|||
|
|||
b.Property<string>("EntityTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("EntityTypeFullName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("AuditLogId"); |
|||
|
|||
b.HasIndex("TenantId", "EntityTypeFullName", "EntityId"); |
|||
|
|||
b.ToTable("AbpEntityChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<Guid>("EntityChangeId"); |
|||
|
|||
b.Property<string>("NewValue") |
|||
.HasColumnName("NewValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("OriginalValue") |
|||
.HasColumnName("OriginalValue") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("PropertyName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("PropertyTypeFullName") |
|||
.IsRequired() |
|||
.HasColumnName("PropertyTypeFullName") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("EntityChangeId"); |
|||
|
|||
b.ToTable("AbpEntityPropertyChanges"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasColumnName("ConcurrencyStamp") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("Description") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsStatic"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("Regex") |
|||
.HasMaxLength(512); |
|||
|
|||
b.Property<string>("RegexDescription") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<bool>("Required"); |
|||
|
|||
b.Property<int>("ValueType"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.ToTable("AbpClaimTypes"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.IsRequired() |
|||
.HasColumnName("ConcurrencyStamp") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDefault") |
|||
.HasColumnName("IsDefault"); |
|||
|
|||
b.Property<bool>("IsPublic") |
|||
.HasColumnName("IsPublic"); |
|||
|
|||
b.Property<bool>("IsStatic") |
|||
.HasColumnName("IsStatic"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("NormalizedName") |
|||
.IsRequired() |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("NormalizedName"); |
|||
|
|||
b.ToTable("AbpRoles"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024); |
|||
|
|||
b.Property<Guid>("RoleId"); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("RoleId"); |
|||
|
|||
b.ToTable("AbpRoleClaims"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<int>("AccessFailedCount") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("AccessFailedCount") |
|||
.HasDefaultValue(0); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("Email") |
|||
.HasColumnName("Email") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<bool>("EmailConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("EmailConfirmed") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("IsDeleted") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<bool>("LockoutEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("LockoutEnabled") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<DateTimeOffset?>("LockoutEnd"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasColumnName("Name") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("NormalizedEmail") |
|||
.HasColumnName("NormalizedEmail") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("NormalizedUserName") |
|||
.IsRequired() |
|||
.HasColumnName("NormalizedUserName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("PasswordHash") |
|||
.HasColumnName("PasswordHash") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("PhoneNumber") |
|||
.HasColumnName("PhoneNumber") |
|||
.HasMaxLength(16); |
|||
|
|||
b.Property<bool>("PhoneNumberConfirmed") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("PhoneNumberConfirmed") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("SecurityStamp") |
|||
.IsRequired() |
|||
.HasColumnName("SecurityStamp") |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("Surname") |
|||
.HasColumnName("Surname") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<Guid?>("TenantId") |
|||
.HasColumnName("TenantId"); |
|||
|
|||
b.Property<bool>("TwoFactorEnabled") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("TwoFactorEnabled") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<string>("UserName") |
|||
.IsRequired() |
|||
.HasColumnName("UserName") |
|||
.HasMaxLength(256); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Email"); |
|||
|
|||
b.HasIndex("NormalizedEmail"); |
|||
|
|||
b.HasIndex("NormalizedUserName"); |
|||
|
|||
b.HasIndex("UserName"); |
|||
|
|||
b.ToTable("AbpUsers"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ClaimType") |
|||
.IsRequired() |
|||
.HasMaxLength(256); |
|||
|
|||
b.Property<string>("ClaimValue") |
|||
.HasMaxLength(1024); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.Property<Guid>("UserId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("UserId"); |
|||
|
|||
b.ToTable("AbpUserClaims"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.Property<Guid>("UserId"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ProviderDisplayName") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(196); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider"); |
|||
|
|||
b.HasIndex("LoginProvider", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpUserLogins"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.Property<Guid>("UserId"); |
|||
|
|||
b.Property<Guid>("RoleId"); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("UserId", "RoleId"); |
|||
|
|||
b.HasIndex("RoleId", "UserId"); |
|||
|
|||
b.ToTable("AbpUserRoles"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.Property<Guid>("UserId"); |
|||
|
|||
b.Property<string>("LoginProvider") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.Property<string>("Value"); |
|||
|
|||
b.HasKey("UserId", "LoginProvider", "Name"); |
|||
|
|||
b.ToTable("AbpUserTokens"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.IsRequired() |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.IsRequired() |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<Guid?>("TenantId"); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpPermissionGrants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(128); |
|||
|
|||
b.Property<string>("ProviderKey") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("ProviderName") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(2048); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name", "ProviderName", "ProviderKey"); |
|||
|
|||
b.ToTable("AbpSettings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b => |
|||
{ |
|||
b.Property<Guid>("Id") |
|||
.ValueGeneratedOnAdd(); |
|||
|
|||
b.Property<string>("ConcurrencyStamp") |
|||
.IsConcurrencyToken() |
|||
.HasColumnName("ConcurrencyStamp"); |
|||
|
|||
b.Property<DateTime>("CreationTime") |
|||
.HasColumnName("CreationTime"); |
|||
|
|||
b.Property<Guid?>("CreatorId") |
|||
.HasColumnName("CreatorId"); |
|||
|
|||
b.Property<Guid?>("DeleterId") |
|||
.HasColumnName("DeleterId"); |
|||
|
|||
b.Property<DateTime?>("DeletionTime") |
|||
.HasColumnName("DeletionTime"); |
|||
|
|||
b.Property<string>("ExtraProperties") |
|||
.HasColumnName("ExtraProperties"); |
|||
|
|||
b.Property<bool>("IsDeleted") |
|||
.ValueGeneratedOnAdd() |
|||
.HasColumnName("IsDeleted") |
|||
.HasDefaultValue(false); |
|||
|
|||
b.Property<DateTime?>("LastModificationTime") |
|||
.HasColumnName("LastModificationTime"); |
|||
|
|||
b.Property<Guid?>("LastModifierId") |
|||
.HasColumnName("LastModifierId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.IsRequired() |
|||
.HasMaxLength(64); |
|||
|
|||
b.HasKey("Id"); |
|||
|
|||
b.HasIndex("Name") |
|||
.IsUnique(); |
|||
|
|||
b.ToTable("AbpTenants"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.Property<Guid>("TenantId"); |
|||
|
|||
b.Property<string>("Name") |
|||
.HasMaxLength(64); |
|||
|
|||
b.Property<string>("Value") |
|||
.IsRequired() |
|||
.HasMaxLength(1024); |
|||
|
|||
b.HasKey("TenantId", "Name"); |
|||
|
|||
b.ToTable("AbpTenantConnectionStrings"); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("Actions") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.AuditLog") |
|||
.WithMany("EntityChanges") |
|||
.HasForeignKey("AuditLogId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.AuditLogging.EntityChange") |
|||
.WithMany("PropertyChanges") |
|||
.HasForeignKey("EntityChangeId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|||
.WithMany("Claims") |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|||
.WithMany("Claims") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|||
.WithMany("Logins") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityRole") |
|||
.WithMany() |
|||
.HasForeignKey("RoleId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
|
|||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|||
.WithMany("Roles") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.Identity.IdentityUser") |
|||
.WithMany("Tokens") |
|||
.HasForeignKey("UserId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
|
|||
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b => |
|||
{ |
|||
b.HasOne("Volo.Abp.TenantManagement.Tenant") |
|||
.WithMany("ConnectionStrings") |
|||
.HasForeignKey("TenantId") |
|||
.OnDelete(DeleteBehavior.Cascade); |
|||
}); |
|||
#pragma warning restore 612, 618
|
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -1,930 +0,0 @@ |
|||
using System; |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace AuthServer.Host.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>(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: 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: "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: 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: "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: "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: true), |
|||
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), |
|||
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: "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: 50000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerPersistedGrants", x => x.Key); |
|||
}); |
|||
|
|||
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: "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_ApiResourceId", |
|||
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_ApiResourceId", |
|||
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: 4000, 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_ApiResourceId", |
|||
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_ClientId", |
|||
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_ClientId", |
|||
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: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientPostLogoutRedirectUris", x => new { x.ClientId, x.PostLogoutRedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientPostLogoutRedirectUris_IdentityServerClients_ClientId", |
|||
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: 2000, nullable: false) |
|||
}, |
|||
constraints: table => |
|||
{ |
|||
table.PrimaryKey("PK_IdentityServerClientRedirectUris", x => new { x.ClientId, x.RedirectUri }); |
|||
table.ForeignKey( |
|||
name: "FK_IdentityServerClientRedirectUris_IdentityServerClients_ClientId", |
|||
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: 4000, 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_IdentityResourceId", |
|||
column: x => x.IdentityResourceId, |
|||
principalTable: "IdentityServerIdentityResources", |
|||
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.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_ApiResourceId_Name", |
|||
columns: x => new { x.ApiResourceId, x.Name }, |
|||
principalTable: "IdentityServerApiScopes", |
|||
principalColumns: new[] { "ApiResourceId", "Name" }, |
|||
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_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_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_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: "AbpAuditLogActions"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpClaimTypes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityPropertyChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpPermissionGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoleClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpSettings"); |
|||
|
|||
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: "IdentityServerIdentityClaims"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerPersistedGrants"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpEntityChanges"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpRoles"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpUsers"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiScopes"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerClients"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerIdentityResources"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "AbpAuditLogs"); |
|||
|
|||
migrationBuilder.DropTable( |
|||
name: "IdentityServerApiResources"); |
|||
} |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
Loading…
Reference in new issue