- 12개 Enum 추가 (Platform, ServiceStatus, SubTier, AdminRole, DeviceStatus, MessageStatus, PushResult, PaymentStatus, TargetType, LinkType, WebhookEvent, WebhookStatus) - ErrorCodes 상수 클래스 추가 (Error_Codes.md 기반 3자리 코드) - Entity byte 필드를 Enum 타입으로 변경 (Service, Admin, Device, PushSendLog, WebhookLog, Payment) - WebhookLog.EventType 컬럼 타입 변경 (varchar→tinyint) 마이그레이션 적용
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SPMS.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class ApplyDomainEnums : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<sbyte>(
|
|
name: "EventType",
|
|
table: "WebhookLog",
|
|
type: "tinyint",
|
|
nullable: false,
|
|
oldClrType: typeof(string),
|
|
oldType: "varchar(50)",
|
|
oldMaxLength: 50)
|
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AlterColumn<string>(
|
|
name: "EventType",
|
|
table: "WebhookLog",
|
|
type: "varchar(50)",
|
|
maxLength: 50,
|
|
nullable: false,
|
|
oldClrType: typeof(sbyte),
|
|
oldType: "tinyint")
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
}
|
|
}
|
|
}
|