id server db resources

This commit is contained in:
Paul Schneider 2026-02-09 01:03:33 +00:00
commit 8d68ee380a
35 changed files with 34026 additions and 2909 deletions

87
.vscode/launch.json vendored
View file

@ -6,7 +6,7 @@
"configurations": [ "configurations": [
{ {
"name": "cli .NET Core Launch (console)", "name": "cli",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
@ -17,13 +17,7 @@
"console": "internalConsole" "console": "internalConsole"
}, },
{ {
"name": "C#: sampleWebAsWebApiClient Debug", "name": "web",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/sampleWebAsWebApiClient/sampleWebAsWebApiClient.csproj"
},
{
"name": ".NET Core Launch (web)",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
@ -39,17 +33,16 @@
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"sourceFileMap": { "sourceFileMap": {
"/Views": "${workspaceFolder}/Views" "/Views": "${workspaceFolder}/src/Yavsc/Views"
} }
}, },
{
/* { "name": "sample web",
"name": ".NET Core Launch (web-client)",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
"program": "${workspaceFolder}/src/sampleWebAsWebApiClient/bin/Debug/net8.0/sampleWebAsWebApiClient.dll>", "program": "${workspaceFolder}/src/sampleWebAsWebApiClient/bin/Debug/net9.0/sampleWebAsWebApiClient.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/src/sampleWebAsWebApiClient", "cwd": "${workspaceFolder}/src/sampleWebAsWebApiClient",
"stopAtEntry": false, "stopAtEntry": false,
@ -61,11 +54,12 @@
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"sourceFileMap": { "sourceFileMap": {
"/Views": "${workspaceFolder}/Views" "/Views": "${workspaceFolder}/src/sampleWebAsWebApiClient/Views"
} }
}, },
{
"name": ".NET Core Launch (Api)", {
"name": "Api",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build-webapi", "preLaunchTask": "build-webapi",
@ -75,35 +69,8 @@
"stopAtEntry": false, "stopAtEntry": false,
"console": "internalConsole" "console": "internalConsole"
}, },
*/
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Yavsc/bin/Debug/net9.0/Yavsc.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Yavsc",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{ {
"name": "webApi", "name": "dotnet webClient",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/Api/Api.csproj"
},
{
"name": "webClient",
"type": "dotnet", "type": "dotnet",
"request": "launch", "request": "launch",
//"projectPath": "${workspaceFolder}/src/Yavsc/Yavsc.csproj", //"projectPath": "${workspaceFolder}/src/Yavsc/Yavsc.csproj",
@ -114,7 +81,7 @@
} }
}, },
{ {
"name": "web", "name": "dotnet web",
"type": "dotnet", "type": "dotnet",
"request": "launch", "request": "launch",
"projectPath": "${workspaceFolder}/src/Yavsc/Yavsc.csproj", "projectPath": "${workspaceFolder}/src/Yavsc/Yavsc.csproj",
@ -127,36 +94,6 @@
"group": "run", "group": "run",
"order": 1 "order": 1
} }
},
{
"name": "lua",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/src/Yavsc/bin/Debug/net9.0/Yavsc.dll",
"env": {
"ASPNETCORE_ENVIRONMENT": "luadev"
},
"cwd": "${workspaceFolder}/src/Yavsc",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
}
},
{
"name": "web core",
"type": "coreclr",
"request": "launch",
"program": "${workspaceFolder}/src/Yavsc/bin/Debug/net9.0/Yavsc.dll",
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"cwd": "${workspaceFolder}/src/Yavsc",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
}
} }
] ]
} }

View file

@ -33,8 +33,10 @@ namespace Yavsc.Models
using Bank; using Bank;
using Payment; using Payment;
using Blog; using Blog;
using IdentityServer8.Models;
using IdentityServer8.EntityFramework.Entities;
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> public class ApplicationDbContext : IdentityDbContext<ApplicationUser>, IdentityServer8.EntityFramework.Interfaces.IConfigurationDbContext
{ {
public ApplicationDbContext() public ApplicationDbContext()
{ {
@ -275,5 +277,18 @@ namespace Yavsc.Models
public DbSet<Scope> Scopes { get; set; } public DbSet<Scope> Scopes { get; set; }
public DbSet<BlogSpotPublication> blogSpotPublications { get; set; } public DbSet<BlogSpotPublication> blogSpotPublications { get; set; }
public DbSet<IdentityServer8.EntityFramework.Entities.Client> Clients { get; set; }
public DbSet<ClientCorsOrigin> ClientCorsOrigins { get; set; }
public DbSet<IdentityServer8.EntityFramework.Entities.IdentityResource> IdentityResources { get; set; }
public DbSet<IdentityServer8.EntityFramework.Entities.ApiResource> ApiResources { get; set; }
public DbSet<IdentityServer8.EntityFramework.Entities.ApiScope> ApiScopes { get; set; }
public DbSet<IdentityResourceClaim> IdentityResourceClaims { get; set; }
public DbSet<IdentityResourceProperty> IdentityResourceProperties { get; set; }
public DbSet<ApiResourceSecret> ApiResourceSecrets { get; set; }
public DbSet<ApiResourceScope> ApiResourceScopes { get; set; }
public DbSet<ApiResourceClaim> ApiResourceClaims { get; set; }
public DbSet<ApiResourceProperty> ApiResourceProperties { get; set; }
public DbSet<ApiScopeClaim> ApiScopeClaims { get; set; }
public DbSet<ApiScopeProperty> ApiScopeProperties { get; set; }
} }
} }

View file

@ -13,8 +13,8 @@ namespace Yavsc.ViewModels.Account
/// Local user's name. /// Local user's name.
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[YaRequired] [Required]
public string EMail { get; set; } public string UserName { get; set; }
/// <summary> /// <summary>
/// Local user's password . /// Local user's password .

View file

@ -6,6 +6,7 @@
<UserSecretsId>53bd70e8-ff81-497a-847f-a15fd8ea7a09</UserSecretsId> <UserSecretsId>53bd70e8-ff81-497a-847f-a15fd8ea7a09</UserSecretsId>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="HigginsSoft.IdentityServer8.EntityFramework" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" />
<PackageReference Include="HigginsSoft.IdentityServer8" /> <PackageReference Include="HigginsSoft.IdentityServer8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" /> <PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" />

View file

@ -417,6 +417,7 @@ namespace Yavsc.Controllers
[Authorize("AdministratorOnly")] [Authorize("AdministratorOnly")]
[Route("Account/UserList/{pageNum?}/{len?}")] [Route("Account/UserList/{pageNum?}/{len?}")]
[HttpGet]
public async Task<IActionResult> UserList(int pageNum = 0, int pageLen = defaultLen) public async Task<IActionResult> UserList(int pageNum = 0, int pageLen = defaultLen)
{ {
var users = _dbContext.Users.OrderBy(u => u.UserName); var users = _dbContext.Users.OrderBy(u => u.UserName);
@ -478,34 +479,12 @@ namespace Yavsc.Controllers
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
var user = _dbContext.Users.Include(u => u.Membership).FirstOrDefault(
u => u.Email == model.EMail);
if (user != null)
{
if (!await _userManager.IsEmailConfirmedAsync(user))
{
ModelState.AddModelError(string.Empty,
"You must have a confirmed email to log in.");
return this.ViewOk(model);
}
}
else
{
ModelState.AddModelError(string.Empty,
"No such user.");
return this.ViewOk(model);
}
// This doesn't count login failures towards account lockout // This doesn't count login failures towards account lockout
// To enable password failures to trigger account lockout, set lockoutOnFailure: true // To enable password failures to trigger account lockout, set lockoutOnFailure: true
var result = await _signInManager.PasswordSignInAsync(model.EMail, model.Password, model.RememberMe, lockoutOnFailure: false); var result = await _signInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, lockoutOnFailure: false);
if (result.Succeeded) if (result.Succeeded)
{ {
// FIXME should be done at granting resources
await _userManager.AddClaimsAsync(user, user.Membership.Select(
m => new Claim(YavscClaimTypes.CircleMembership, m.CircleId.ToString())
));
return Redirect(model.ReturnUrl ?? "/"); return Redirect(model.ReturnUrl ?? "/");
} }
@ -520,7 +499,7 @@ namespace Yavsc.Controllers
} }
else else
{ {
ModelState.AddModelError(string.Empty, $"Invalid login attempt. ({model.EMail}, {model.Password})"); ModelState.AddModelError(string.Empty, $"Invalid login attempt. ({model.UserName}, {model.Password})");
return this.ViewOk(model); return this.ViewOk(model);
} }
} }

View file

@ -54,6 +54,7 @@ namespace Yavsc.Controllers
[Route("~/Title/{id?}")] [Route("~/Title/{id?}")]
[AllowAnonymous] [AllowAnonymous]
[HttpGet]
public IActionResult Title(string id) public IActionResult Title(string id)
{ {
ViewData["Title"] = id; ViewData["Title"] = id;

View file

@ -78,6 +78,7 @@ namespace Yavsc.Controllers
[Produces("text/x-tex"), Authorize, Route("estimate-{id}.tex")] [Produces("text/x-tex"), Authorize, Route("estimate-{id}.tex")]
[HttpGet]
public ViewResult EstimateTex(long id) public ViewResult EstimateTex(long id)
{ {
var estimate = _context.Estimates.Include(x => x.Query) var estimate = _context.Estimates.Include(x => x.Query)
@ -91,6 +92,7 @@ namespace Yavsc.Controllers
} }
[Authorize, Route("Estimate-{id}.pdf")] [Authorize, Route("Estimate-{id}.pdf")]
[HttpGet]
public IActionResult EstimatePdf(long id) public IActionResult EstimatePdf(long id)
{ {
ViewBag.TempDir = Config.SiteSetup.TempDir; ViewBag.TempDir = Config.SiteSetup.TempDir;

View file

@ -20,20 +20,21 @@ namespace Yavsc.Controllers
} }
[Route("~/Git/sources/{*path}")] [Route("~/Git/sources/{*path}")]
public IActionResult Sources (string path) [HttpGet]
public IActionResult Sources(string path)
{ {
if (path == null) if (path == null)
{ {
return NotFound(); return NotFound();
} }
/* /*
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == path); GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Path == path);
if (gitRepositoryReference == null) if (gitRepositoryReference == null)
{ {
return NotFound(); return NotFound();
} }
*/ */
var info = Config.GitOptions.FileProvider.GetFileInfo(path); var info = Config.GitOptions.FileProvider.GetFileInfo(path);
if (!info.Exists) if (!info.Exists)
return NotFound(); return NotFound();
@ -43,17 +44,18 @@ namespace Yavsc.Controllers
var accept = Request.Headers["Accept"]; var accept = Request.Headers["Accept"];
if (accept.Any(v => v.Split(',').Contains("text/html"))) if (accept.Any(v => v.Split(',').Contains("text/html")))
{ {
return File(AnsiToHtmlEncoder.GetStream(stream), "text/html"); return File(AnsiToHtmlEncoder.GetStream(stream), "text/html");
} }
return File(stream,"text/text"); return File(stream, "text/text");
} }
if (path.EndsWith(".html")) return File(stream,"text/html"); if (path.EndsWith(".html")) return File(stream, "text/html");
if (path.EndsWith(".cshtml")) return File(stream,"text/razor-html-csharp"); if (path.EndsWith(".cshtml")) return File(stream, "text/razor-html-csharp");
if (path.EndsWith(".cs")) return File(stream,"text/csharp"); if (path.EndsWith(".cs")) return File(stream, "text/csharp");
return File(stream,"application/octet-stream"); return File(stream, "application/octet-stream");
} }
// GET: Git // GET: Git
[HttpGet]
public async Task<IActionResult> Index() public async Task<IActionResult> Index()
{ {
var applicationDbContext = _context.GitRepositoryReference.Include(g => g.Owner); var applicationDbContext = _context.GitRepositoryReference.Include(g => g.Owner);
@ -61,6 +63,7 @@ namespace Yavsc.Controllers
} }
// GET: Git/Details/5 // GET: Git/Details/5
[HttpGet]
public async Task<IActionResult> Details(long id) public async Task<IActionResult> Details(long id)
{ {
@ -74,6 +77,7 @@ namespace Yavsc.Controllers
} }
// GET: Git/Create // GET: Git/Create
[HttpGet]
public IActionResult Create() public IActionResult Create()
{ {
return View(); return View();
@ -97,6 +101,7 @@ namespace Yavsc.Controllers
} }
// GET: Git/Edit/5 // GET: Git/Edit/5
[HttpGet]
public async Task<IActionResult> Edit(long id) public async Task<IActionResult> Edit(long id)
{ {
GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id); GitRepositoryReference gitRepositoryReference = await _context.GitRepositoryReference.SingleAsync(m => m.Id == id);
@ -125,6 +130,7 @@ namespace Yavsc.Controllers
// GET: Git/Delete/5 // GET: Git/Delete/5
[ActionName("Delete")] [ActionName("Delete")]
[HttpGet]
public async Task<IActionResult> Delete(string id) public async Task<IActionResult> Delete(string id)
{ {
if (id == null) if (id == null)

View file

@ -38,6 +38,9 @@ using System.Reflection;
using IdentityServer8.EntityFramework.DbContexts; using IdentityServer8.EntityFramework.DbContexts;
using IdentityServer8.EntityFramework.Mappers; using IdentityServer8.EntityFramework.Mappers;
using System.IdentityModel.Tokens.Jwt; using System.IdentityModel.Tokens.Jwt;
using IdentityServer8.EntityFramework.Stores;
using IdentityServer8.EntityFramework.Services;
using IdentityServer8.EntityFramework.Interfaces;
namespace Yavsc.Extensions; namespace Yavsc.Extensions;
@ -255,6 +258,10 @@ public static class HostingExtensions
options.EmitStaticAudienceClaim = true; options.EmitStaticAudienceClaim = true;
}) })
.AddAspNetIdentity<ApplicationUser>()
.AddClientStore<ClientStore>()
.AddCorsPolicyService<CorsPolicyService>()
.AddResourceStore<ResourceStore>()
//.AddInMemoryIdentityResources(Config.IdentityResources) //.AddInMemoryIdentityResources(Config.IdentityResources)
//.AddInMemoryClients(Config.TestingClients) //.AddInMemoryClients(Config.TestingClients)
//.AddInMemoryApiScopes(Config.TestingApiScopes) //.AddInMemoryApiScopes(Config.TestingApiScopes)
@ -267,8 +274,7 @@ public static class HostingExtensions
{ {
options.ConfigureDbContext = b => b.UseNpgsql(connectionString, options.ConfigureDbContext = b => b.UseNpgsql(connectionString,
sql => sql.MigrationsAssembly(migrationsAssembly)); sql => sql.MigrationsAssembly(migrationsAssembly));
}) });
.AddAspNetIdentity<ApplicationUser>();
builder.Services.Configure<IdentityOptions>(options => builder.Services.Configure<IdentityOptions>(options =>
{ {
@ -392,6 +398,7 @@ public static class HostingExtensions
payPalSettings, googleAuthSettings, localization, loggerFactory, payPalSettings, googleAuthSettings, localization, loggerFactory,
app.Environment.EnvironmentName); app.Environment.EnvironmentName);
app.ConfigureFileServerApp(); app.ConfigureFileServerApp();
app.UseSession();
return app; return app;
} }
private static void InitializeDatabase(this IApplicationBuilder app) private static void InitializeDatabase(this IApplicationBuilder app)

View file

@ -1,40 +0,0 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class pending : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Client");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Client",
columns: table => new
{
Id = table.Column<string>(type: "text", nullable: false),
AccessTokenLifetime = table.Column<int>(type: "integer", nullable: false),
Active = table.Column<bool>(type: "boolean", nullable: false),
DisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
LogoutRedirectUri = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
RedirectUri = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
RefreshTokenLifeTime = table.Column<int>(type: "integer", nullable: false),
Secret = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false),
Type = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Client", x => x.Id);
});
}
}
}

View file

@ -12,7 +12,7 @@ using Yavsc.Models;
namespace Yavsc.Migrations namespace Yavsc.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
[Migration("20250824130510_init")] [Migration("20260209000346_init")]
partial class init partial class init
{ {
/// <inheritdoc /> /// <inheritdoc />
@ -25,6 +25,664 @@ namespace Yavsc.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("ApiResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceScope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceSecret");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.HasKey("Id");
b.ToTable("ApiScopes");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Key")
.HasColumnType("text");
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenType")
.HasColumnType("integer");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("boolean");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("boolean");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("boolean");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("boolean");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("boolean");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("boolean");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("text");
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("text");
b.Property<string>("ClientId")
.HasColumnType("text");
b.Property<string>("ClientName")
.HasColumnType("text");
b.Property<string>("ClientUri")
.HasColumnType("text");
b.Property<int?>("ConsentLifetime")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("text");
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("IncludeJwtId")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("LogoUri")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("text");
b.Property<string>("ProtocolType")
.HasColumnType("text");
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("integer");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("integer");
b.Property<bool>("RequireClientSecret")
.HasColumnType("boolean");
b.Property<bool>("RequireConsent")
.HasColumnType("boolean");
b.Property<bool>("RequirePkce")
.HasColumnType("boolean");
b.Property<bool>("RequireRequestObject")
.HasColumnType("boolean");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.Property<string>("UserCodeType")
.HasColumnType("text");
b.Property<int?>("UserSsoLifetime")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Origin")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientCorsOrigins");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("GrantType")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientGrantType");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Provider")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientIdPRestriction");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientPostLogoutRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("RedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientScope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientSecret");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("IdentityResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceProperty");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
@ -432,47 +1090,6 @@ namespace Yavsc.Migrations
b.ToTable("AspNetUsers", (string)null); b.ToTable("AspNetUsers", (string)null);
}); });
modelBuilder.Entity("Yavsc.Models.Auth.Client", b =>
{
b.Property<string>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("text");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("Active")
.HasColumnType("boolean");
b.Property<string>("DisplayName")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("LogoutRedirectUri")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<string>("RedirectUri")
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<int>("RefreshTokenLifeTime")
.HasColumnType("integer");
b.Property<string>("Secret")
.IsRequired()
.HasMaxLength(512)
.HasColumnType("character varying(512)");
b.Property<int>("Type")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Client");
});
modelBuilder.Entity("Yavsc.Models.Auth.Scope", b => modelBuilder.Entity("Yavsc.Models.Auth.Scope", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
@ -2478,6 +3095,193 @@ namespace Yavsc.Migrations
b.ToTable("GitRepositoryReference"); b.ToTable("GitRepositoryReference");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("UserClaims")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("Properties")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("Properties")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{ {
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
@ -3318,6 +4122,52 @@ namespace Yavsc.Migrations
b.Navigation("Owner"); b.Navigation("Owner");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Navigation("Properties");
b.Navigation("Scopes");
b.Navigation("Secrets");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Navigation("AllowedCorsOrigins");
b.Navigation("AllowedGrantTypes");
b.Navigation("AllowedScopes");
b.Navigation("Claims");
b.Navigation("ClientSecrets");
b.Navigation("IdentityProviderRestrictions");
b.Navigation("PostLogoutRedirectUris");
b.Navigation("Properties");
b.Navigation("RedirectUris");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{ {
b.Navigation("AccountBalance"); b.Navigation("AccountBalance");

View file

@ -40,6 +40,47 @@ namespace Yavsc.Migrations
principalColumn: "Code"); principalColumn: "Code");
}); });
migrationBuilder.CreateTable(
name: "ApiResources",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "text", nullable: true),
DisplayName = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(type: "text", nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ApiScopes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "text", nullable: true),
DisplayName = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopes", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AspNetRoles", name: "AspNetRoles",
columns: table => new columns: table => new
@ -54,25 +95,6 @@ namespace Yavsc.Migrations
table.PrimaryKey("PK_AspNetRoles", x => x.Id); table.PrimaryKey("PK_AspNetRoles", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "Client",
columns: table => new
{
Id = table.Column<string>(type: "text", nullable: false),
DisplayName = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
RedirectUri = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
LogoutRedirectUri = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: true),
Secret = table.Column<string>(type: "character varying(512)", maxLength: 512, nullable: false),
Type = table.Column<int>(type: "integer", nullable: false),
Active = table.Column<bool>(type: "boolean", nullable: false),
RefreshTokenLifeTime = table.Column<int>(type: "integer", nullable: false),
AccessTokenLifetime = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Client", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "ClientProviderInfo", name: "ClientProviderInfo",
columns: table => new columns: table => new
@ -89,6 +111,61 @@ namespace Yavsc.Migrations
table.PrimaryKey("PK_ClientProviderInfo", x => x.UserId); table.PrimaryKey("PK_ClientProviderInfo", x => x.UserId);
}); });
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
ClientId = table.Column<string>(type: "text", nullable: true),
ProtocolType = table.Column<string>(type: "text", nullable: true),
RequireClientSecret = table.Column<bool>(type: "boolean", nullable: false),
ClientName = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
ClientUri = table.Column<string>(type: "text", nullable: true),
LogoUri = table.Column<string>(type: "text", nullable: true),
RequireConsent = table.Column<bool>(type: "boolean", nullable: false),
AllowRememberConsent = table.Column<bool>(type: "boolean", nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(type: "boolean", nullable: false),
RequirePkce = table.Column<bool>(type: "boolean", nullable: false),
AllowPlainTextPkce = table.Column<bool>(type: "boolean", nullable: false),
RequireRequestObject = table.Column<bool>(type: "boolean", nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(type: "boolean", nullable: false),
FrontChannelLogoutUri = table.Column<string>(type: "text", nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
BackChannelLogoutUri = table.Column<string>(type: "text", nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
AllowOfflineAccess = table.Column<bool>(type: "boolean", nullable: false),
IdentityTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(type: "text", nullable: true),
AccessTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AuthorizationCodeLifetime = table.Column<int>(type: "integer", nullable: false),
ConsentLifetime = table.Column<int>(type: "integer", nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
RefreshTokenUsage = table.Column<int>(type: "integer", nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(type: "boolean", nullable: false),
RefreshTokenExpiration = table.Column<int>(type: "integer", nullable: false),
AccessTokenType = table.Column<int>(type: "integer", nullable: false),
EnableLocalLogin = table.Column<bool>(type: "boolean", nullable: false),
IncludeJwtId = table.Column<bool>(type: "boolean", nullable: false),
AlwaysSendClientClaims = table.Column<bool>(type: "boolean", nullable: false),
ClientClaimsPrefix = table.Column<string>(type: "text", nullable: true),
PairWiseSubjectSalt = table.Column<string>(type: "text", nullable: true),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
UserSsoLifetime = table.Column<int>(type: "integer", nullable: true),
UserCodeType = table.Column<string>(type: "text", nullable: true),
DeviceCodeLifetime = table.Column<int>(type: "integer", nullable: false),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Color", name: "Color",
columns: table => new columns: table => new
@ -212,6 +289,28 @@ namespace Yavsc.Migrations
table.PrimaryKey("PK_HairPrestation", x => x.Id); table.PrimaryKey("PK_HairPrestation", x => x.Id);
}); });
migrationBuilder.CreateTable(
name: "IdentityResources",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "text", nullable: true),
DisplayName = table.Column<string>(type: "text", nullable: true),
Description = table.Column<string>(type: "text", nullable: true),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResources", x => x.Id);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "Instrument", name: "Instrument",
columns: table => new columns: table => new
@ -442,6 +541,132 @@ namespace Yavsc.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "ApiResourceClaim",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceClaim", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceClaim_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceProperty",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceProperty", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceProperty_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceScope",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column<string>(type: "text", nullable: true),
ApiResourceId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceScope", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceScope_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceSecret",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Description = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Type = table.Column<string>(type: "text", nullable: true),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceSecret", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceSecret_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeClaim",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeClaim", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeClaim_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeProperty",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeProperty", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeProperty_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AspNetRoleClaims", name: "AspNetRoleClaims",
columns: table => new columns: table => new
@ -463,6 +688,192 @@ namespace Yavsc.Migrations
onDelete: ReferentialAction.Cascade); onDelete: ReferentialAction.Cascade);
}); });
migrationBuilder.CreateTable(
name: "ClientClaim",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientClaim", x => x.Id);
table.ForeignKey(
name: "FK_ClientClaim_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientCorsOrigins",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Origin = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientCorsOrigins", x => x.Id);
table.ForeignKey(
name: "FK_ClientCorsOrigins_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientGrantType",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GrantType = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientGrantType", x => x.Id);
table.ForeignKey(
name: "FK_ClientGrantType_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientIdPRestriction",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Provider = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientIdPRestriction", x => x.Id);
table.ForeignKey(
name: "FK_ClientIdPRestriction_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientPostLogoutRedirectUri",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PostLogoutRedirectUri = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientPostLogoutRedirectUri", x => x.Id);
table.ForeignKey(
name: "FK_ClientPostLogoutRedirectUri_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientProperty",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientProperty", x => x.Id);
table.ForeignKey(
name: "FK_ClientProperty_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientRedirectUri",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RedirectUri = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientRedirectUri", x => x.Id);
table.ForeignKey(
name: "FK_ClientRedirectUri_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientScope",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column<string>(type: "text", nullable: true),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientScope", x => x.Id);
table.ForeignKey(
name: "FK_ClientScope_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientSecret",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column<int>(type: "integer", nullable: false),
Description = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Type = table.Column<string>(type: "text", nullable: true),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientSecret", x => x.Id);
table.ForeignKey(
name: "FK_ClientSecret_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "HairTaint", name: "HairTaint",
columns: table => new columns: table => new
@ -529,6 +940,47 @@ namespace Yavsc.Migrations
principalColumn: "UserId"); principalColumn: "UserId");
}); });
migrationBuilder.CreateTable(
name: "IdentityResourceClaim",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
IdentityResourceId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResourceClaim", x => x.Id);
table.ForeignKey(
name: "FK_IdentityResourceClaim_IdentityResources_IdentityResourceId",
column: x => x.IdentityResourceId,
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityResourceProperty",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
IdentityResourceId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "text", nullable: true),
Value = table.Column<string>(type: "text", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResourceProperty", x => x.Id);
table.ForeignKey(
name: "FK_IdentityResourceProperty_IdentityResources_IdentityResource~",
column: x => x.IdentityResourceId,
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable( migrationBuilder.CreateTable(
name: "AspNetUsers", name: "AspNetUsers",
columns: table => new columns: table => new
@ -1849,6 +2301,36 @@ namespace Yavsc.Migrations
table: "Announce", table: "Announce",
column: "OwnerId"); column: "OwnerId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceClaim_ApiResourceId",
table: "ApiResourceClaim",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceProperty_ApiResourceId",
table: "ApiResourceProperty",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceScope_ApiResourceId",
table: "ApiResourceScope",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceSecret_ApiResourceId",
table: "ApiResourceSecret",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiScopeClaim_ScopeId",
table: "ApiScopeClaim",
column: "ScopeId");
migrationBuilder.CreateIndex(
name: "IX_ApiScopeProperty_ScopeId",
table: "ApiScopeProperty",
column: "ScopeId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_AspNetRoleClaims_RoleId", name: "IX_AspNetRoleClaims_RoleId",
table: "AspNetRoleClaims", table: "AspNetRoleClaims",
@ -1966,6 +2448,51 @@ namespace Yavsc.Migrations
table: "CircleMembers", table: "CircleMembers",
column: "CircleId"); column: "CircleId");
migrationBuilder.CreateIndex(
name: "IX_ClientClaim_ClientId",
table: "ClientClaim",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientCorsOrigins_ClientId",
table: "ClientCorsOrigins",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientGrantType_ClientId",
table: "ClientGrantType",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientIdPRestriction_ClientId",
table: "ClientIdPRestriction",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientPostLogoutRedirectUri_ClientId",
table: "ClientPostLogoutRedirectUri",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientProperty_ClientId",
table: "ClientProperty",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientRedirectUri_ClientId",
table: "ClientRedirectUri",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientScope_ClientId",
table: "ClientScope",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientSecret_ClientId",
table: "ClientSecret",
column: "ClientId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_CommandForm_ActivityCode", name: "IX_CommandForm_ActivityCode",
table: "CommandForm", table: "CommandForm",
@ -2141,6 +2668,16 @@ namespace Yavsc.Migrations
table: "HyperLink", table: "HyperLink",
column: "PayPalPaymentCreationToken"); column: "PayPalPaymentCreationToken");
migrationBuilder.CreateIndex(
name: "IX_IdentityResourceClaim_IdentityResourceId",
table: "IdentityResourceClaim",
column: "IdentityResourceId");
migrationBuilder.CreateIndex(
name: "IX_IdentityResourceProperty_IdentityResourceId",
table: "IdentityResourceProperty",
column: "IdentityResourceId");
migrationBuilder.CreateIndex( migrationBuilder.CreateIndex(
name: "IX_Instrumentation_UserId", name: "IX_Instrumentation_UserId",
table: "Instrumentation", table: "Instrumentation",
@ -2258,6 +2795,24 @@ namespace Yavsc.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Announce"); name: "Announce");
migrationBuilder.DropTable(
name: "ApiResourceClaim");
migrationBuilder.DropTable(
name: "ApiResourceProperty");
migrationBuilder.DropTable(
name: "ApiResourceScope");
migrationBuilder.DropTable(
name: "ApiResourceSecret");
migrationBuilder.DropTable(
name: "ApiScopeClaim");
migrationBuilder.DropTable(
name: "ApiScopeProperty");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AspNetRoleClaims"); name: "AspNetRoleClaims");
@ -2307,11 +2862,35 @@ namespace Yavsc.Migrations
name: "CircleMembers"); name: "CircleMembers");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Client"); name: "ClientClaim");
migrationBuilder.DropTable(
name: "ClientCorsOrigins");
migrationBuilder.DropTable(
name: "ClientGrantType");
migrationBuilder.DropTable(
name: "ClientIdPRestriction");
migrationBuilder.DropTable(
name: "ClientPostLogoutRedirectUri");
migrationBuilder.DropTable(
name: "ClientProperty");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "ClientProviderInfo"); name: "ClientProviderInfo");
migrationBuilder.DropTable(
name: "ClientRedirectUri");
migrationBuilder.DropTable(
name: "ClientScope");
migrationBuilder.DropTable(
name: "ClientSecret");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "CommandForm"); name: "CommandForm");
@ -2351,6 +2930,12 @@ namespace Yavsc.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "HyperLink"); name: "HyperLink");
migrationBuilder.DropTable(
name: "IdentityResourceClaim");
migrationBuilder.DropTable(
name: "IdentityResourceProperty");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Instrumentation"); name: "Instrumentation");
@ -2393,6 +2978,12 @@ namespace Yavsc.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "UserActivities"); name: "UserActivities");
migrationBuilder.DropTable(
name: "ApiResources");
migrationBuilder.DropTable(
name: "ApiScopes");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "AspNetRoles"); name: "AspNetRoles");
@ -2411,6 +3002,9 @@ namespace Yavsc.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Circle"); name: "Circle");
migrationBuilder.DropTable(
name: "Clients");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "EstimateTemplates"); name: "EstimateTemplates");
@ -2441,6 +3035,9 @@ namespace Yavsc.Migrations
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "BrusherProfile"); name: "BrusherProfile");
migrationBuilder.DropTable(
name: "IdentityResources");
migrationBuilder.DropTable( migrationBuilder.DropTable(
name: "Instrument"); name: "Instrument");

View file

@ -12,8 +12,8 @@ using Yavsc.Models;
namespace Yavsc.Migrations namespace Yavsc.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
[Migration("20250825123014_pending")] [Migration("20260209001035_idResClams")]
partial class pending partial class idResClams
{ {
/// <inheritdoc /> /// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -25,6 +25,664 @@ namespace Yavsc.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("ApiResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceScope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceSecret");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.HasKey("Id");
b.ToTable("ApiScopes");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Key")
.HasColumnType("text");
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenType")
.HasColumnType("integer");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("boolean");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("boolean");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("boolean");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("boolean");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("boolean");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("boolean");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("text");
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("text");
b.Property<string>("ClientId")
.HasColumnType("text");
b.Property<string>("ClientName")
.HasColumnType("text");
b.Property<string>("ClientUri")
.HasColumnType("text");
b.Property<int?>("ConsentLifetime")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("text");
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("IncludeJwtId")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("LogoUri")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("text");
b.Property<string>("ProtocolType")
.HasColumnType("text");
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("integer");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("integer");
b.Property<bool>("RequireClientSecret")
.HasColumnType("boolean");
b.Property<bool>("RequireConsent")
.HasColumnType("boolean");
b.Property<bool>("RequirePkce")
.HasColumnType("boolean");
b.Property<bool>("RequireRequestObject")
.HasColumnType("boolean");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.Property<string>("UserCodeType")
.HasColumnType("text");
b.Property<int?>("UserSsoLifetime")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Origin")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientCorsOrigins");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("GrantType")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientGrantType");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Provider")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientIdPRestriction");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientPostLogoutRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("RedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientScope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientSecret");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("IdentityResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceProperty");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
@ -2437,6 +3095,193 @@ namespace Yavsc.Migrations
b.ToTable("GitRepositoryReference"); b.ToTable("GitRepositoryReference");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("UserClaims")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("Properties")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("Properties")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{ {
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
@ -3277,6 +4122,52 @@ namespace Yavsc.Migrations
b.Navigation("Owner"); b.Navigation("Owner");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Navigation("Properties");
b.Navigation("Scopes");
b.Navigation("Secrets");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Navigation("AllowedCorsOrigins");
b.Navigation("AllowedGrantTypes");
b.Navigation("AllowedScopes");
b.Navigation("Claims");
b.Navigation("ClientSecrets");
b.Navigation("IdentityProviderRestrictions");
b.Navigation("PostLogoutRedirectUris");
b.Navigation("Properties");
b.Navigation("RedirectUris");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{ {
b.Navigation("AccountBalance"); b.Navigation("AccountBalance");

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class idResClams : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_IdentityResourceClaim_IdentityResources_IdentityResourceId",
table: "IdentityResourceClaim");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityResourceClaim",
table: "IdentityResourceClaim");
migrationBuilder.RenameTable(
name: "IdentityResourceClaim",
newName: "IdentityResourceClaims");
migrationBuilder.RenameIndex(
name: "IX_IdentityResourceClaim_IdentityResourceId",
table: "IdentityResourceClaims",
newName: "IX_IdentityResourceClaims_IdentityResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityResourceClaims",
table: "IdentityResourceClaims",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IdentityResourceClaims_IdentityResources_IdentityResourceId",
table: "IdentityResourceClaims",
column: "IdentityResourceId",
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_IdentityResourceClaims_IdentityResources_IdentityResourceId",
table: "IdentityResourceClaims");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityResourceClaims",
table: "IdentityResourceClaims");
migrationBuilder.RenameTable(
name: "IdentityResourceClaims",
newName: "IdentityResourceClaim");
migrationBuilder.RenameIndex(
name: "IX_IdentityResourceClaims_IdentityResourceId",
table: "IdentityResourceClaim",
newName: "IX_IdentityResourceClaim_IdentityResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityResourceClaim",
table: "IdentityResourceClaim",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IdentityResourceClaim_IdentityResources_IdentityResourceId",
table: "IdentityResourceClaim",
column: "IdentityResourceId",
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class IdentityResourceProperties : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_IdentityResourceProperty_IdentityResources_IdentityResource~",
table: "IdentityResourceProperty");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityResourceProperty",
table: "IdentityResourceProperty");
migrationBuilder.RenameTable(
name: "IdentityResourceProperty",
newName: "IdentityResourceProperties");
migrationBuilder.RenameIndex(
name: "IX_IdentityResourceProperty_IdentityResourceId",
table: "IdentityResourceProperties",
newName: "IX_IdentityResourceProperties_IdentityResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityResourceProperties",
table: "IdentityResourceProperties",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IdentityResourceProperties_IdentityResources_IdentityResour~",
table: "IdentityResourceProperties",
column: "IdentityResourceId",
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_IdentityResourceProperties_IdentityResources_IdentityResour~",
table: "IdentityResourceProperties");
migrationBuilder.DropPrimaryKey(
name: "PK_IdentityResourceProperties",
table: "IdentityResourceProperties");
migrationBuilder.RenameTable(
name: "IdentityResourceProperties",
newName: "IdentityResourceProperty");
migrationBuilder.RenameIndex(
name: "IX_IdentityResourceProperties_IdentityResourceId",
table: "IdentityResourceProperty",
newName: "IX_IdentityResourceProperty_IdentityResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_IdentityResourceProperty",
table: "IdentityResourceProperty",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_IdentityResourceProperty_IdentityResources_IdentityResource~",
table: "IdentityResourceProperty",
column: "IdentityResourceId",
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiResourceSecrets : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceSecret_ApiResources_ApiResourceId",
table: "ApiResourceSecret");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceSecret",
table: "ApiResourceSecret");
migrationBuilder.RenameTable(
name: "ApiResourceSecret",
newName: "ApiResourceSecrets");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceSecret_ApiResourceId",
table: "ApiResourceSecrets",
newName: "IX_ApiResourceSecrets_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceSecrets",
table: "ApiResourceSecrets",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceSecrets_ApiResources_ApiResourceId",
table: "ApiResourceSecrets",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceSecrets_ApiResources_ApiResourceId",
table: "ApiResourceSecrets");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceSecrets",
table: "ApiResourceSecrets");
migrationBuilder.RenameTable(
name: "ApiResourceSecrets",
newName: "ApiResourceSecret");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceSecrets_ApiResourceId",
table: "ApiResourceSecret",
newName: "IX_ApiResourceSecret_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceSecret",
table: "ApiResourceSecret",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceSecret_ApiResources_ApiResourceId",
table: "ApiResourceSecret",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiResourceScopes : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceScope_ApiResources_ApiResourceId",
table: "ApiResourceScope");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceScope",
table: "ApiResourceScope");
migrationBuilder.RenameTable(
name: "ApiResourceScope",
newName: "ApiResourceScopes");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceScope_ApiResourceId",
table: "ApiResourceScopes",
newName: "IX_ApiResourceScopes_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceScopes",
table: "ApiResourceScopes",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceScopes_ApiResources_ApiResourceId",
table: "ApiResourceScopes",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceScopes_ApiResources_ApiResourceId",
table: "ApiResourceScopes");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceScopes",
table: "ApiResourceScopes");
migrationBuilder.RenameTable(
name: "ApiResourceScopes",
newName: "ApiResourceScope");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceScopes_ApiResourceId",
table: "ApiResourceScope",
newName: "IX_ApiResourceScope_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceScope",
table: "ApiResourceScope",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceScope_ApiResources_ApiResourceId",
table: "ApiResourceScope",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiResourceClaims : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceClaim_ApiResources_ApiResourceId",
table: "ApiResourceClaim");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceClaim",
table: "ApiResourceClaim");
migrationBuilder.RenameTable(
name: "ApiResourceClaim",
newName: "ApiResourceClaims");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceClaim_ApiResourceId",
table: "ApiResourceClaims",
newName: "IX_ApiResourceClaims_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceClaims",
table: "ApiResourceClaims",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceClaims_ApiResources_ApiResourceId",
table: "ApiResourceClaims",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceClaims_ApiResources_ApiResourceId",
table: "ApiResourceClaims");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceClaims",
table: "ApiResourceClaims");
migrationBuilder.RenameTable(
name: "ApiResourceClaims",
newName: "ApiResourceClaim");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceClaims_ApiResourceId",
table: "ApiResourceClaim",
newName: "IX_ApiResourceClaim_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceClaim",
table: "ApiResourceClaim",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceClaim_ApiResources_ApiResourceId",
table: "ApiResourceClaim",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiResourceProperties : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceProperty_ApiResources_ApiResourceId",
table: "ApiResourceProperty");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceProperty",
table: "ApiResourceProperty");
migrationBuilder.RenameTable(
name: "ApiResourceProperty",
newName: "ApiResourceProperties");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceProperty_ApiResourceId",
table: "ApiResourceProperties",
newName: "IX_ApiResourceProperties_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceProperties",
table: "ApiResourceProperties",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceProperties_ApiResources_ApiResourceId",
table: "ApiResourceProperties",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiResourceProperties_ApiResources_ApiResourceId",
table: "ApiResourceProperties");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiResourceProperties",
table: "ApiResourceProperties");
migrationBuilder.RenameTable(
name: "ApiResourceProperties",
newName: "ApiResourceProperty");
migrationBuilder.RenameIndex(
name: "IX_ApiResourceProperties_ApiResourceId",
table: "ApiResourceProperty",
newName: "IX_ApiResourceProperty_ApiResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiResourceProperty",
table: "ApiResourceProperty",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiResourceProperty_ApiResources_ApiResourceId",
table: "ApiResourceProperty",
column: "ApiResourceId",
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiScopeClaims : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiScopeClaim_ApiScopes_ScopeId",
table: "ApiScopeClaim");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiScopeClaim",
table: "ApiScopeClaim");
migrationBuilder.RenameTable(
name: "ApiScopeClaim",
newName: "ApiScopeClaims");
migrationBuilder.RenameIndex(
name: "IX_ApiScopeClaim_ScopeId",
table: "ApiScopeClaims",
newName: "IX_ApiScopeClaims_ScopeId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiScopeClaims",
table: "ApiScopeClaims",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiScopeClaims_ApiScopes_ScopeId",
table: "ApiScopeClaims",
column: "ScopeId",
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiScopeClaims_ApiScopes_ScopeId",
table: "ApiScopeClaims");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiScopeClaims",
table: "ApiScopeClaims");
migrationBuilder.RenameTable(
name: "ApiScopeClaims",
newName: "ApiScopeClaim");
migrationBuilder.RenameIndex(
name: "IX_ApiScopeClaims_ScopeId",
table: "ApiScopeClaim",
newName: "IX_ApiScopeClaim_ScopeId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiScopeClaim",
table: "ApiScopeClaim",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiScopeClaim_ApiScopes_ScopeId",
table: "ApiScopeClaim",
column: "ScopeId",
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,78 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class ApiScopeProperties : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiScopeProperty_ApiScopes_ScopeId",
table: "ApiScopeProperty");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiScopeProperty",
table: "ApiScopeProperty");
migrationBuilder.RenameTable(
name: "ApiScopeProperty",
newName: "ApiScopeProperties");
migrationBuilder.RenameIndex(
name: "IX_ApiScopeProperty_ScopeId",
table: "ApiScopeProperties",
newName: "IX_ApiScopeProperties_ScopeId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiScopeProperties",
table: "ApiScopeProperties",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiScopeProperties_ApiScopes_ScopeId",
table: "ApiScopeProperties",
column: "ScopeId",
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ApiScopeProperties_ApiScopes_ScopeId",
table: "ApiScopeProperties");
migrationBuilder.DropPrimaryKey(
name: "PK_ApiScopeProperties",
table: "ApiScopeProperties");
migrationBuilder.RenameTable(
name: "ApiScopeProperties",
newName: "ApiScopeProperty");
migrationBuilder.RenameIndex(
name: "IX_ApiScopeProperties_ScopeId",
table: "ApiScopeProperty",
newName: "IX_ApiScopeProperty_ScopeId");
migrationBuilder.AddPrimaryKey(
name: "PK_ApiScopeProperty",
table: "ApiScopeProperty",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_ApiScopeProperty_ApiScopes_ScopeId",
table: "ApiScopeProperty",
column: "ScopeId",
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}

View file

@ -22,6 +22,664 @@ namespace Yavsc.Migrations
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("AllowedAccessTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("ApiResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceProperties");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceScopes");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ApiResourceId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ApiResourceId");
b.ToTable("ApiResourceSecrets");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.HasKey("Id");
b.ToTable("ApiScopes");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Key")
.HasColumnType("text");
b.Property<int>("ScopeId")
.HasColumnType("integer");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ScopeId");
b.ToTable("ApiScopeProperties");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("AbsoluteRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenLifetime")
.HasColumnType("integer");
b.Property<int>("AccessTokenType")
.HasColumnType("integer");
b.Property<bool>("AllowAccessTokensViaBrowser")
.HasColumnType("boolean");
b.Property<bool>("AllowOfflineAccess")
.HasColumnType("boolean");
b.Property<bool>("AllowPlainTextPkce")
.HasColumnType("boolean");
b.Property<bool>("AllowRememberConsent")
.HasColumnType("boolean");
b.Property<string>("AllowedIdentityTokenSigningAlgorithms")
.HasColumnType("text");
b.Property<bool>("AlwaysIncludeUserClaimsInIdToken")
.HasColumnType("boolean");
b.Property<bool>("AlwaysSendClientClaims")
.HasColumnType("boolean");
b.Property<int>("AuthorizationCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("BackChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("BackChannelLogoutUri")
.HasColumnType("text");
b.Property<string>("ClientClaimsPrefix")
.HasColumnType("text");
b.Property<string>("ClientId")
.HasColumnType("text");
b.Property<string>("ClientName")
.HasColumnType("text");
b.Property<string>("ClientUri")
.HasColumnType("text");
b.Property<int?>("ConsentLifetime")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<int>("DeviceCodeLifetime")
.HasColumnType("integer");
b.Property<bool>("EnableLocalLogin")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<bool>("FrontChannelLogoutSessionRequired")
.HasColumnType("boolean");
b.Property<string>("FrontChannelLogoutUri")
.HasColumnType("text");
b.Property<int>("IdentityTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("IncludeJwtId")
.HasColumnType("boolean");
b.Property<DateTime?>("LastAccessed")
.HasColumnType("timestamp with time zone");
b.Property<string>("LogoUri")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<string>("PairWiseSubjectSalt")
.HasColumnType("text");
b.Property<string>("ProtocolType")
.HasColumnType("text");
b.Property<int>("RefreshTokenExpiration")
.HasColumnType("integer");
b.Property<int>("RefreshTokenUsage")
.HasColumnType("integer");
b.Property<bool>("RequireClientSecret")
.HasColumnType("boolean");
b.Property<bool>("RequireConsent")
.HasColumnType("boolean");
b.Property<bool>("RequirePkce")
.HasColumnType("boolean");
b.Property<bool>("RequireRequestObject")
.HasColumnType("boolean");
b.Property<int>("SlidingRefreshTokenLifetime")
.HasColumnType("integer");
b.Property<bool>("UpdateAccessTokenClaimsOnRefresh")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.Property<string>("UserCodeType")
.HasColumnType("text");
b.Property<int?>("UserSsoLifetime")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("Clients");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientClaim");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Origin")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientCorsOrigins");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("GrantType")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientGrantType");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Provider")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientIdPRestriction");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("PostLogoutRedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientPostLogoutRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientProperty");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("RedirectUri")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientRedirectUri");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<string>("Scope")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientScope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("ClientId")
.HasColumnType("integer");
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<DateTime?>("Expiration")
.HasColumnType("timestamp with time zone");
b.Property<string>("Type")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("ClientId");
b.ToTable("ClientSecret");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<DateTime>("Created")
.HasColumnType("timestamp with time zone");
b.Property<string>("Description")
.HasColumnType("text");
b.Property<string>("DisplayName")
.HasColumnType("text");
b.Property<bool>("Emphasize")
.HasColumnType("boolean");
b.Property<bool>("Enabled")
.HasColumnType("boolean");
b.Property<string>("Name")
.HasColumnType("text");
b.Property<bool>("NonEditable")
.HasColumnType("boolean");
b.Property<bool>("Required")
.HasColumnType("boolean");
b.Property<bool>("ShowInDiscoveryDocument")
.HasColumnType("boolean");
b.Property<DateTime?>("Updated")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.ToTable("IdentityResources");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Type")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<int>("IdentityResourceId")
.HasColumnType("integer");
b.Property<string>("Key")
.HasColumnType("text");
b.Property<string>("Value")
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("IdentityResourceId");
b.ToTable("IdentityResourceProperties");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRole", b =>
{ {
b.Property<string>("Id") b.Property<string>("Id")
@ -2434,6 +3092,193 @@ namespace Yavsc.Migrations
b.ToTable("GitRepositoryReference"); b.ToTable("GitRepositoryReference");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("UserClaims")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Properties")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Scopes")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResourceSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiResource", "ApiResource")
.WithMany("Secrets")
.HasForeignKey("ApiResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ApiResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("UserClaims")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScopeProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.ApiScope", "Scope")
.WithMany("Properties")
.HasForeignKey("ScopeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Scope");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Claims")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientCorsOrigin", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedCorsOrigins")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientGrantType", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedGrantTypes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientIdPRestriction", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("IdentityProviderRestrictions")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientPostLogoutRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("PostLogoutRedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("Properties")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientRedirectUri", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("RedirectUris")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientScope", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("AllowedScopes")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ClientSecret", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.Client", "Client")
.WithMany("ClientSecrets")
.HasForeignKey("ClientId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Client");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceClaim", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("UserClaims")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResourceProperty", b =>
{
b.HasOne("IdentityServer8.EntityFramework.Entities.IdentityResource", "IdentityResource")
.WithMany("Properties")
.HasForeignKey("IdentityResourceId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("IdentityResource");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.IdentityRoleClaim<string>", b =>
{ {
b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null) b.HasOne("Microsoft.AspNetCore.Identity.IdentityRole", null)
@ -3274,6 +4119,52 @@ namespace Yavsc.Migrations
b.Navigation("Owner"); b.Navigation("Owner");
}); });
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiResource", b =>
{
b.Navigation("Properties");
b.Navigation("Scopes");
b.Navigation("Secrets");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.ApiScope", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.Client", b =>
{
b.Navigation("AllowedCorsOrigins");
b.Navigation("AllowedGrantTypes");
b.Navigation("AllowedScopes");
b.Navigation("Claims");
b.Navigation("ClientSecrets");
b.Navigation("IdentityProviderRestrictions");
b.Navigation("PostLogoutRedirectUris");
b.Navigation("Properties");
b.Navigation("RedirectUris");
});
modelBuilder.Entity("IdentityServer8.EntityFramework.Entities.IdentityResource", b =>
{
b.Navigation("Properties");
b.Navigation("UserClaims");
});
modelBuilder.Entity("Yavsc.Models.ApplicationUser", b => modelBuilder.Entity("Yavsc.Models.ApplicationUser", b =>
{ {
b.Navigation("AccountBalance"); b.Navigation("AccountBalance");

File diff suppressed because it is too large Load diff

View file

@ -1,663 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Yavsc.Migrations.ConfigurationDb
{
/// <inheritdoc />
public partial class init : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ApiResources",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
AllowedAccessTokenSigningAlgorithms = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ApiScopes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopes", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Clients",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
ClientId = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ProtocolType = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
RequireClientSecret = table.Column<bool>(type: "boolean", nullable: false),
ClientName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
ClientUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
LogoUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
RequireConsent = table.Column<bool>(type: "boolean", nullable: false),
AllowRememberConsent = table.Column<bool>(type: "boolean", nullable: false),
AlwaysIncludeUserClaimsInIdToken = table.Column<bool>(type: "boolean", nullable: false),
RequirePkce = table.Column<bool>(type: "boolean", nullable: false),
AllowPlainTextPkce = table.Column<bool>(type: "boolean", nullable: false),
RequireRequestObject = table.Column<bool>(type: "boolean", nullable: false),
AllowAccessTokensViaBrowser = table.Column<bool>(type: "boolean", nullable: false),
FrontChannelLogoutUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
FrontChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
BackChannelLogoutUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
BackChannelLogoutSessionRequired = table.Column<bool>(type: "boolean", nullable: false),
AllowOfflineAccess = table.Column<bool>(type: "boolean", nullable: false),
IdentityTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AllowedIdentityTokenSigningAlgorithms = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
AccessTokenLifetime = table.Column<int>(type: "integer", nullable: false),
AuthorizationCodeLifetime = table.Column<int>(type: "integer", nullable: false),
ConsentLifetime = table.Column<int>(type: "integer", nullable: true),
AbsoluteRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
SlidingRefreshTokenLifetime = table.Column<int>(type: "integer", nullable: false),
RefreshTokenUsage = table.Column<int>(type: "integer", nullable: false),
UpdateAccessTokenClaimsOnRefresh = table.Column<bool>(type: "boolean", nullable: false),
RefreshTokenExpiration = table.Column<int>(type: "integer", nullable: false),
AccessTokenType = table.Column<int>(type: "integer", nullable: false),
EnableLocalLogin = table.Column<bool>(type: "boolean", nullable: false),
IncludeJwtId = table.Column<bool>(type: "boolean", nullable: false),
AlwaysSendClientClaims = table.Column<bool>(type: "boolean", nullable: false),
ClientClaimsPrefix = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
PairWiseSubjectSalt = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
LastAccessed = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
UserSsoLifetime = table.Column<int>(type: "integer", nullable: true),
UserCodeType = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true),
DeviceCodeLifetime = table.Column<int>(type: "integer", nullable: false),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Clients", x => x.Id);
});
migrationBuilder.CreateTable(
name: "IdentityResources",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Enabled = table.Column<bool>(type: "boolean", nullable: false),
Name = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
DisplayName = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Required = table.Column<bool>(type: "boolean", nullable: false),
Emphasize = table.Column<bool>(type: "boolean", nullable: false),
ShowInDiscoveryDocument = table.Column<bool>(type: "boolean", nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Updated = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
NonEditable = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResources", x => x.Id);
});
migrationBuilder.CreateTable(
name: "ApiResourceClaims",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceClaims", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceClaims_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceProperties",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceProperties", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceProperties_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceScopes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ApiResourceId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceScopes", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceScopes_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiResourceSecrets",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ApiResourceId = table.Column<int>(type: "integer", nullable: false),
Description = table.Column<string>(type: "character varying(1000)", maxLength: 1000, nullable: true),
Value = table.Column<string>(type: "character varying(4000)", maxLength: 4000, nullable: false),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiResourceSecrets", x => x.Id);
table.ForeignKey(
name: "FK_ApiResourceSecrets_ApiResources_ApiResourceId",
column: x => x.ApiResourceId,
principalTable: "ApiResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeClaims",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeClaims", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeClaims_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ApiScopeProperties",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ScopeId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ApiScopeProperties", x => x.Id);
table.ForeignKey(
name: "FK_ApiScopeProperties_ApiScopes_ScopeId",
column: x => x.ScopeId,
principalTable: "ApiScopes",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientClaims",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientClaims", x => x.Id);
table.ForeignKey(
name: "FK_ClientClaims_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientCorsOrigins",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Origin = table.Column<string>(type: "character varying(150)", maxLength: 150, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientCorsOrigins", x => x.Id);
table.ForeignKey(
name: "FK_ClientCorsOrigins_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientGrantTypes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
GrantType = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientGrantTypes", x => x.Id);
table.ForeignKey(
name: "FK_ClientGrantTypes_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientIdPRestrictions",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Provider = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientIdPRestrictions", x => x.Id);
table.ForeignKey(
name: "FK_ClientIdPRestrictions_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientPostLogoutRedirectUris",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
PostLogoutRedirectUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientPostLogoutRedirectUris", x => x.Id);
table.ForeignKey(
name: "FK_ClientPostLogoutRedirectUris_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientProperties",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientProperties", x => x.Id);
table.ForeignKey(
name: "FK_ClientProperties_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientRedirectUris",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
RedirectUri = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientRedirectUris", x => x.Id);
table.ForeignKey(
name: "FK_ClientRedirectUris_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientScopes",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Scope = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
ClientId = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientScopes", x => x.Id);
table.ForeignKey(
name: "FK_ClientScopes_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ClientSecrets",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
ClientId = table.Column<int>(type: "integer", nullable: false),
Description = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
Value = table.Column<string>(type: "character varying(4000)", maxLength: 4000, nullable: false),
Expiration = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
Type = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Created = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClientSecrets", x => x.Id);
table.ForeignKey(
name: "FK_ClientSecrets_Clients_ClientId",
column: x => x.ClientId,
principalTable: "Clients",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityResourceClaims",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
IdentityResourceId = table.Column<int>(type: "integer", nullable: false),
Type = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResourceClaims", x => x.Id);
table.ForeignKey(
name: "FK_IdentityResourceClaims_IdentityResources_IdentityResourceId",
column: x => x.IdentityResourceId,
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "IdentityResourceProperties",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
IdentityResourceId = table.Column<int>(type: "integer", nullable: false),
Key = table.Column<string>(type: "character varying(250)", maxLength: 250, nullable: false),
Value = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_IdentityResourceProperties", x => x.Id);
table.ForeignKey(
name: "FK_IdentityResourceProperties_IdentityResources_IdentityResour~",
column: x => x.IdentityResourceId,
principalTable: "IdentityResources",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_ApiResourceClaims_ApiResourceId",
table: "ApiResourceClaims",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceProperties_ApiResourceId",
table: "ApiResourceProperties",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResources_Name",
table: "ApiResources",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_ApiResourceScopes_ApiResourceId",
table: "ApiResourceScopes",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiResourceSecrets_ApiResourceId",
table: "ApiResourceSecrets",
column: "ApiResourceId");
migrationBuilder.CreateIndex(
name: "IX_ApiScopeClaims_ScopeId",
table: "ApiScopeClaims",
column: "ScopeId");
migrationBuilder.CreateIndex(
name: "IX_ApiScopeProperties_ScopeId",
table: "ApiScopeProperties",
column: "ScopeId");
migrationBuilder.CreateIndex(
name: "IX_ApiScopes_Name",
table: "ApiScopes",
column: "Name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_ClientClaims_ClientId",
table: "ClientClaims",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientCorsOrigins_ClientId",
table: "ClientCorsOrigins",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientGrantTypes_ClientId",
table: "ClientGrantTypes",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientIdPRestrictions_ClientId",
table: "ClientIdPRestrictions",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientPostLogoutRedirectUris_ClientId",
table: "ClientPostLogoutRedirectUris",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientProperties_ClientId",
table: "ClientProperties",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientRedirectUris_ClientId",
table: "ClientRedirectUris",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_Clients_ClientId",
table: "Clients",
column: "ClientId",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_ClientScopes_ClientId",
table: "ClientScopes",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_ClientSecrets_ClientId",
table: "ClientSecrets",
column: "ClientId");
migrationBuilder.CreateIndex(
name: "IX_IdentityResourceClaims_IdentityResourceId",
table: "IdentityResourceClaims",
column: "IdentityResourceId");
migrationBuilder.CreateIndex(
name: "IX_IdentityResourceProperties_IdentityResourceId",
table: "IdentityResourceProperties",
column: "IdentityResourceId");
migrationBuilder.CreateIndex(
name: "IX_IdentityResources_Name",
table: "IdentityResources",
column: "Name",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ApiResourceClaims");
migrationBuilder.DropTable(
name: "ApiResourceProperties");
migrationBuilder.DropTable(
name: "ApiResourceScopes");
migrationBuilder.DropTable(
name: "ApiResourceSecrets");
migrationBuilder.DropTable(
name: "ApiScopeClaims");
migrationBuilder.DropTable(
name: "ApiScopeProperties");
migrationBuilder.DropTable(
name: "ClientClaims");
migrationBuilder.DropTable(
name: "ClientCorsOrigins");
migrationBuilder.DropTable(
name: "ClientGrantTypes");
migrationBuilder.DropTable(
name: "ClientIdPRestrictions");
migrationBuilder.DropTable(
name: "ClientPostLogoutRedirectUris");
migrationBuilder.DropTable(
name: "ClientProperties");
migrationBuilder.DropTable(
name: "ClientRedirectUris");
migrationBuilder.DropTable(
name: "ClientScopes");
migrationBuilder.DropTable(
name: "ClientSecrets");
migrationBuilder.DropTable(
name: "IdentityResourceClaims");
migrationBuilder.DropTable(
name: "IdentityResourceProperties");
migrationBuilder.DropTable(
name: "ApiResources");
migrationBuilder.DropTable(
name: "ApiScopes");
migrationBuilder.DropTable(
name: "Clients");
migrationBuilder.DropTable(
name: "IdentityResources");
}
}
}

View file

@ -16,7 +16,6 @@ namespace Yavsc
.AddEnvironmentVariables() .AddEnvironmentVariables()
.Build(); .Build();
var app = await builder.ConfigureWebAppServices().ConfigurePipeline(); var app = await builder.ConfigureWebAppServices().ConfigurePipeline();
app.UseSession();
app.Run(); app.Run();
} }
} }

View file

@ -14,10 +14,10 @@
<form asp-action="SignIn" class="form-horizontal" role="form"> <form asp-action="SignIn" class="form-horizontal" role="form">
<div asp-validation-summary="All" class="text-danger"></div> <div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group"> <div class="form-group">
<label for="EMail" class="col-md-2 control-label">EMail</label> <label for="EMail" class="col-md-2 control-label">Username</label>
<div class="col-md-10"> <div class="col-md-10">
<input asp-for="EMail" class="form-control" autocomplete="email" aria-required="true" placeholder="name@example.com" /> <input asp-for="UserName" class="form-control" autocomplete="email" aria-required="true" placeholder="UserName" />
<span asp-validation-for="EMail" class="text-danger"></span> <span asp-validation-for="UserName" class="text-danger"></span>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">

View file

@ -52,7 +52,7 @@ else
<a class="nav-link" asp-controller="Account" asp-action="Register" >Register</a> <a class="nav-link" asp-controller="Account" asp-action="Register" >Register</a>
</li> </li>
<li class="dropdown-item"> <li class="dropdown-item">
<a class="nav-link" asp-controller="Account" asp-action="Login" asp-route-ReturnUrl="~/" >Login</a> <a class="nav-link" asp-controller="Account" asp-action="Signin" asp-route-ReturnUrl="~/" >Signin</a>
</li> </li>
} }