Suppression colonne password en DB
This commit is contained in:
81
BlazorPolicyAuth/Migrations/20260208143144_userpassword.Designer.cs
generated
Normal file
81
BlazorPolicyAuth/Migrations/20260208143144_userpassword.Designer.cs
generated
Normal file
@@ -0,0 +1,81 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using BlazorPolicyAuth.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BlazorPolicyAuth.Migrations
|
||||
{
|
||||
[DbContext(typeof(AppDbContext))]
|
||||
[Migration("20260208143144_userpassword")]
|
||||
partial class userpassword
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
|
||||
|
||||
modelBuilder.Entity("BlazorPolicyAuth.Models.Entities.UserAccount", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<DateTime>("DateCreated")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("email");
|
||||
|
||||
b.Property<byte[]>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("BLOB");
|
||||
|
||||
b.Property<byte[]>("PasswordSalt")
|
||||
.IsRequired()
|
||||
.HasColumnType("BLOB");
|
||||
|
||||
b.Property<string>("Role")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("user_account");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("BlazorPolicyAuth.Models.Entities.UserAccountPolicy", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("id");
|
||||
|
||||
b.Property<bool>("IsEnabled")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("is_enabled");
|
||||
|
||||
b.Property<int>("UserAccountId")
|
||||
.HasColumnType("INTEGER")
|
||||
.HasColumnName("user_account_policy");
|
||||
|
||||
b.Property<string>("UserPolicy")
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("user_policy");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("user_account_policy");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
29
BlazorPolicyAuth/Migrations/20260208143144_userpassword.cs
Normal file
29
BlazorPolicyAuth/Migrations/20260208143144_userpassword.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BlazorPolicyAuth.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class userpassword : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "password",
|
||||
table: "user_account");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "password",
|
||||
table: "user_account",
|
||||
type: "TEXT",
|
||||
maxLength: 100,
|
||||
nullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ namespace BlazorPolicyAuth.Migrations
|
||||
protected override void BuildModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "10.0.1");
|
||||
modelBuilder.HasAnnotation("ProductVersion", "10.0.2");
|
||||
|
||||
modelBuilder.Entity("BlazorPolicyAuth.Models.Entities.UserAccount", b =>
|
||||
{
|
||||
@@ -32,11 +32,6 @@ namespace BlazorPolicyAuth.Migrations
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("email");
|
||||
|
||||
b.Property<string>("Password")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("TEXT")
|
||||
.HasColumnName("password");
|
||||
|
||||
b.Property<byte[]>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("BLOB");
|
||||
|
||||
@@ -15,8 +15,8 @@ public class UserAccount
|
||||
[Column("email")]
|
||||
[MaxLength(200)]
|
||||
public string? Email { get; set; }
|
||||
|
||||
[Column("password")]
|
||||
|
||||
[NotMapped]
|
||||
[MaxLength(100)]
|
||||
public string? Password { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user