Browse Source

Add user password history entity and migration

pull/24086/head
maliming 7 months ago
parent
commit
27c7ec2197
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 1408
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20251031064909_ABP10_1.Designer.cs
  2. 42
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20251031064909_ABP10_1.cs
  3. 32
      modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs

1408
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20251031064909_ABP10_1.Designer.cs

File diff suppressed because it is too large

42
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/20251031064909_ABP10_1.cs

@ -0,0 +1,42 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Migrations
{
/// <inheritdoc />
public partial class ABP10_1 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpUserPasswordHistories",
columns: table => new
{
UserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Password = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: false),
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CreatedAt = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpUserPasswordHistories", x => new { x.UserId, x.Password });
table.ForeignKey(
name: "FK_AbpUserPasswordHistories_AbpUsers_UserId",
column: x => x.UserId,
principalTable: "AbpUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpUserPasswordHistories");
}
}
}

32
modules/docs/app/VoloDocs.EntityFrameworkCore/Migrations/VoloDocsDbContextModelSnapshot.cs

@ -678,6 +678,27 @@ namespace Migrations
b.ToTable("AbpUserOrganizationUnits", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b =>
{
b.Property<Guid>("UserId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Password")
.HasMaxLength(256)
.HasColumnType("nvarchar(256)");
b.Property<DateTimeOffset>("CreatedAt")
.HasColumnType("datetimeoffset");
b.Property<Guid?>("TenantId")
.HasColumnType("uniqueidentifier")
.HasColumnName("TenantId");
b.HasKey("UserId", "Password");
b.ToTable("AbpUserPasswordHistories", (string)null);
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.Property<Guid>("UserId")
@ -1271,6 +1292,15 @@ namespace Migrations
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserPasswordHistory", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityUser", null)
.WithMany("PasswordHistories")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
{
b.HasOne("Volo.Abp.Identity.IdentityRole", null)
@ -1348,6 +1378,8 @@ namespace Migrations
b.Navigation("OrganizationUnits");
b.Navigation("PasswordHistories");
b.Navigation("Roles");
b.Navigation("Tokens");

Loading…
Cancel
Save