Merge pull request 'Fixed migration' (#25) from setup into master
Reviewed-on: #25
This commit was merged in pull request #25.
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "10.0.7",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
],
|
||||||
|
"rollForward": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.7">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
"ForwardLimit": 1
|
"ForwardLimit": 1
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"AdminLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminAuditLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"AdminAuditLogDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"AdminConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"AdminConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"AdminApiConfiguration": {
|
"AdminApiConfiguration": {
|
||||||
"ApplicationName": "Lite Charms Security UI",
|
"ApplicationName": "Lite Charms Security UI",
|
||||||
@@ -80,9 +80,9 @@
|
|||||||
"ReadConfigurationFromKeyVault": false
|
"ReadConfigurationFromKeyVault": false
|
||||||
},
|
},
|
||||||
"SeedConfiguration": {
|
"SeedConfiguration": {
|
||||||
"ApplySeed": true
|
"ApplySeed": false
|
||||||
},
|
},
|
||||||
"DatabaseMigrationsConfiguration": {
|
"DatabaseMigrationsConfiguration": {
|
||||||
"ApplyDatabaseMigrations": true
|
"ApplyDatabaseMigrations": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+350
@@ -0,0 +1,350 @@
|
|||||||
|
// <auto-generated />
|
||||||
|
using System;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identity
|
||||||
|
{
|
||||||
|
[DbContext(typeof(AdminIdentityDbContext))]
|
||||||
|
[Migration("20260606104139_FixModelDrift")]
|
||||||
|
partial class FixModelDrift
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
#pragma warning disable 612, 618
|
||||||
|
modelBuilder
|
||||||
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<int>("AccessFailedCount")
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Email")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("EmailConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<bool>("LockoutEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||||
|
.HasColumnType("timestamp with time zone");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedEmail")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedUserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("PasswordHash")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("PhoneNumber")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<bool>("PhoneNumberConfirmed")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("SecurityStamp")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<bool>("TwoFactorEnabled")
|
||||||
|
.HasColumnType("boolean");
|
||||||
|
|
||||||
|
b.Property<string>("UserName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedEmail")
|
||||||
|
.HasDatabaseName("EmailIndex");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedUserName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("UserNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("Users", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.Property<byte[]>("CredentialId")
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("bytea");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("CredentialId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserPasskeys", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("Id")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ConcurrencyStamp")
|
||||||
|
.IsConcurrencyToken()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.Property<string>("NormalizedName")
|
||||||
|
.HasMaxLength(256)
|
||||||
|
.HasColumnType("character varying(256)");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("NormalizedName")
|
||||||
|
.IsUnique()
|
||||||
|
.HasDatabaseName("RoleNameIndex");
|
||||||
|
|
||||||
|
b.ToTable("Roles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRoleClaim", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("RoleId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("RoleClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserClaim", b =>
|
||||||
|
{
|
||||||
|
b.Property<int>("Id")
|
||||||
|
.ValueGeneratedOnAdd()
|
||||||
|
.HasColumnType("integer");
|
||||||
|
|
||||||
|
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
|
||||||
|
|
||||||
|
b.Property<string>("ClaimType")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("ClaimValue")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("Id");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserClaims", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderKey")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("ProviderDisplayName")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("LoginProvider", "ProviderKey");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserLogins", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserRole", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("RoleId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "RoleId");
|
||||||
|
|
||||||
|
b.HasIndex("RoleId");
|
||||||
|
|
||||||
|
b.ToTable("UserRoles", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserToken", b =>
|
||||||
|
{
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.Property<string>("LoginProvider")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.HasMaxLength(450)
|
||||||
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
|
b.Property<string>("Value")
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("UserId", "LoginProvider", "Name");
|
||||||
|
|
||||||
|
b.ToTable("UserTokens", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.OwnsOne("Microsoft.AspNetCore.Identity.IdentityPasskeyData", "Data", b1 =>
|
||||||
|
{
|
||||||
|
b1.Property<byte[]>("UserIdentityPasskeyCredentialId");
|
||||||
|
|
||||||
|
b1.Property<byte[]>("AttestationObject")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<byte[]>("ClientDataJson")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<DateTimeOffset>("CreatedAt");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsBackedUp");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsBackupEligible");
|
||||||
|
|
||||||
|
b1.Property<bool>("IsUserVerified");
|
||||||
|
|
||||||
|
b1.Property<string>("Name");
|
||||||
|
|
||||||
|
b1.Property<byte[]>("PublicKey")
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b1.Property<long>("SignCount");
|
||||||
|
|
||||||
|
b1.PrimitiveCollection<string>("Transports");
|
||||||
|
|
||||||
|
b1.HasKey("UserIdentityPasskeyCredentialId");
|
||||||
|
|
||||||
|
b1.ToTable("UserPasskeys");
|
||||||
|
|
||||||
|
b1
|
||||||
|
.ToJson("Data")
|
||||||
|
.HasColumnType("jsonb");
|
||||||
|
|
||||||
|
b1.WithOwner()
|
||||||
|
.HasForeignKey("UserIdentityPasskeyCredentialId");
|
||||||
|
});
|
||||||
|
|
||||||
|
b.Navigation("Data")
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRoleClaim", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserClaim", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserRole", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("RoleId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserToken", b =>
|
||||||
|
{
|
||||||
|
b.HasOne("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", null)
|
||||||
|
.WithMany()
|
||||||
|
.HasForeignKey("UserId")
|
||||||
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
|
.IsRequired();
|
||||||
|
});
|
||||||
|
#pragma warning restore 612, 618
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+98
@@ -0,0 +1,98 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identity
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class FixModelDrift : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Name",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ProviderKey",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(450)",
|
||||||
|
maxLength: 450,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(128)",
|
||||||
|
oldMaxLength: 128);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "Name",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserTokens",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "ProviderKey",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "LoginProvider",
|
||||||
|
table: "UserLogins",
|
||||||
|
type: "character varying(128)",
|
||||||
|
maxLength: 128,
|
||||||
|
nullable: false,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "character varying(450)",
|
||||||
|
oldMaxLength: 450);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+28
-28
@@ -1,10 +1,10 @@
|
|||||||
// <auto-generated />
|
// <auto-generated />
|
||||||
using System;
|
using System;
|
||||||
|
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||||
using LiteCharmsSecurity.Admin.EntityFramework.Shared.DbContexts;
|
|
||||||
|
|
||||||
#nullable disable
|
#nullable disable
|
||||||
|
|
||||||
@@ -17,28 +17,11 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
{
|
{
|
||||||
#pragma warning disable 612, 618
|
#pragma warning disable 612, 618
|
||||||
modelBuilder
|
modelBuilder
|
||||||
.HasAnnotation("ProductVersion", "10.0.2")
|
.HasAnnotation("ProductVersion", "10.0.7")
|
||||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||||
|
|
||||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
|
||||||
{
|
|
||||||
b.Property<byte[]>("CredentialId")
|
|
||||||
.HasMaxLength(1024)
|
|
||||||
.HasColumnType("bytea");
|
|
||||||
|
|
||||||
b.Property<string>("UserId")
|
|
||||||
.IsRequired()
|
|
||||||
.HasColumnType("text");
|
|
||||||
|
|
||||||
b.HasKey("CredentialId");
|
|
||||||
|
|
||||||
b.HasIndex("UserId");
|
|
||||||
|
|
||||||
b.ToTable("UserPasskeys", (string)null);
|
|
||||||
});
|
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentity", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
@@ -104,6 +87,23 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
b.ToTable("Users", (string)null);
|
b.ToTable("Users", (string)null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityPasskey", b =>
|
||||||
|
{
|
||||||
|
b.Property<byte[]>("CredentialId")
|
||||||
|
.HasMaxLength(1024)
|
||||||
|
.HasColumnType("bytea");
|
||||||
|
|
||||||
|
b.Property<string>("UserId")
|
||||||
|
.IsRequired()
|
||||||
|
.HasColumnType("text");
|
||||||
|
|
||||||
|
b.HasKey("CredentialId");
|
||||||
|
|
||||||
|
b.HasIndex("UserId");
|
||||||
|
|
||||||
|
b.ToTable("UserPasskeys", (string)null);
|
||||||
|
});
|
||||||
|
|
||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityRole", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("Id")
|
b.Property<string>("Id")
|
||||||
@@ -183,12 +183,12 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
modelBuilder.Entity("LiteCharmsSecurity.Admin.EntityFramework.Shared.Entities.Identity.UserIdentityUserLogin", b =>
|
||||||
{
|
{
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("ProviderKey")
|
b.Property<string>("ProviderKey")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("ProviderDisplayName")
|
b.Property<string>("ProviderDisplayName")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
@@ -225,12 +225,12 @@ namespace LiteCharmsSecurity.Admin.EntityFramework.PostgreSQL.Migrations.Identit
|
|||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("LoginProvider")
|
b.Property<string>("LoginProvider")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("Name")
|
b.Property<string>("Name")
|
||||||
.HasMaxLength(128)
|
.HasMaxLength(450)
|
||||||
.HasColumnType("character varying(128)");
|
.HasColumnType("character varying(450)");
|
||||||
|
|
||||||
b.Property<string>("Value")
|
b.Property<string>("Value")
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|||||||
+4
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="10.0.7" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.7">
|
||||||
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
<PackageReference Include="Skoruba.AuditLogging.EntityFramework" Version="3.0.0" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Admin.Storage" Version="3.0.0-rc4" />
|
||||||
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0-rc4" />
|
<PackageReference Include="Skoruba.Duende.IdentityServer.Admin.EntityFramework.Configuration" Version="3.0.0-rc4" />
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
"ProtectKeysWithAzureKeyVault": false
|
"ProtectKeysWithAzureKeyVault": false
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"AzureKeyVaultConfiguration": {
|
"AzureKeyVaultConfiguration": {
|
||||||
"AzureKeyVaultEndpoint": "",
|
"AzureKeyVaultEndpoint": "",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"ConfigurationDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"PersistedGrantDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;",
|
"IdentityDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;",
|
||||||
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;application_name=litecharms_security;"
|
"DataProtectionDbConnection": "Server=192.168.1.170;Port=5432;Database=skoruba;User Id=skoruba;Password=wsb7sebwm$BoZ9;"
|
||||||
},
|
},
|
||||||
"DatabaseProviderConfiguration": {
|
"DatabaseProviderConfiguration": {
|
||||||
"ProviderType": "PostgreSQL"
|
"ProviderType": "PostgreSQL"
|
||||||
|
|||||||
Reference in New Issue
Block a user