fix: AdminCode 컬럼 길이 불일치 수정 (#257) #264
1253
SPMS.Infrastructure/Migrations/20260226083344_ExpandAdminCodeLength.Designer.cs
generated
Normal file
1253
SPMS.Infrastructure/Migrations/20260226083344_ExpandAdminCodeLength.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,42 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SPMS.Infrastructure.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ExpandAdminCodeLength : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "AdminCode",
|
||||
table: "Admin",
|
||||
type: "varchar(12)",
|
||||
maxLength: 12,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(8)",
|
||||
oldMaxLength: 8)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "AdminCode",
|
||||
table: "Admin",
|
||||
type: "varchar(8)",
|
||||
maxLength: 8,
|
||||
nullable: false,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "varchar(12)",
|
||||
oldMaxLength: 12)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -32,8 +32,8 @@ namespace SPMS.Infrastructure.Migrations
|
|||
|
||||
b.Property<string>("AdminCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(8)
|
||||
.HasColumnType("varchar(8)");
|
||||
.HasMaxLength(12)
|
||||
.HasColumnType("varchar(12)");
|
||||
|
||||
b.Property<bool>("AgreePrivacy")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class AdminConfiguration : IEntityTypeConfiguration<Admin>
|
|||
builder.HasKey(e => e.Id);
|
||||
builder.Property(e => e.Id).ValueGeneratedOnAdd();
|
||||
|
||||
builder.Property(e => e.AdminCode).HasMaxLength(8).IsRequired();
|
||||
builder.Property(e => e.AdminCode).HasMaxLength(12).IsRequired();
|
||||
builder.HasIndex(e => e.AdminCode).IsUnique();
|
||||
|
||||
builder.Property(e => e.Email).HasMaxLength(100).IsRequired();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user