Browse Source

fix(migrations): add oldComment to AlterColumn (comment) ops — avoid duplicate sp_addextendedproperty on from-scratch apply

EF generated AlterColumn with comment: but no oldComment:, causing sp_addextendedproperty to re-add an existing MS_Description (SQL error 15233) when migrations apply from an empty DB. Set oldComment == comment on all 21 sites so the extended property is not re-added.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
KIM-JINO5 2 weeks ago
parent
commit
609416d2fa

+ 14 - 7
Infrastructure/Persistence/Migrations/20260128073436_a2.cs

@@ -116,7 +116,8 @@ public partial class a2 : Migration
             comment: "대표 전화번호",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "대표 전화번호");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_SiteUrl",
@@ -140,7 +141,8 @@ public partial class a2 : Migration
             comment: "통신판매업 신고번호",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "통신판매업 신고번호");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_RegNo",
@@ -151,7 +153,8 @@ public partial class a2 : Migration
             comment: "사업자 등록 번호",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "사업자 등록 번호");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_Owner",
@@ -162,7 +165,8 @@ public partial class a2 : Migration
             comment: "대표자 명",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "대표자 명");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_Name",
@@ -173,7 +177,8 @@ public partial class a2 : Migration
             comment: "상호 명",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "상호 명");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_Hosting",
@@ -197,7 +202,8 @@ public partial class a2 : Migration
             comment: "FAX",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "FAX");
 
         migrationBuilder.AlterColumn<string>(
             name: "Company_BankOwner",
@@ -273,7 +279,8 @@ public partial class a2 : Migration
             comment: "부가통신 사업자번호",
             oldClrType: typeof(string),
             oldType: "nvarchar(max)",
-            oldNullable: true);
+            oldNullable: true,
+                oldComment: "부가통신 사업자번호");
 
         migrationBuilder.AlterColumn<string>(
             name: "Basic_SmtpUsername",

+ 4 - 2
Infrastructure/Persistence/Migrations/20260218044853_RenameCoinNameToKorEngName.cs

@@ -30,7 +30,8 @@ public partial class RenameCoinNameToKorEngName : Migration
             type: "nvarchar(200)",
             maxLength: 200,
             nullable: false,
-            comment: "한글 이름");
+            comment: "한글 이름",
+                oldComment: "한글 이름");
 
         migrationBuilder.AddColumn<string>(
             name: "EngName",
@@ -71,6 +72,7 @@ public partial class RenameCoinNameToKorEngName : Migration
             type: "nvarchar(200)",
             maxLength: 200,
             nullable: false,
-            comment: "코인 이름");
+            comment: "코인 이름",
+                oldComment: "코인 이름");
     }
 }

+ 12 - 6
Infrastructure/Persistence/Migrations/20260515083158_AddPaymentConfigExtended.cs

@@ -30,7 +30,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldType: "decimal(5,2)",
                 oldPrecision: 5,
                 oldScale: 2,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "가상계좌 수수료(%)");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "Payment_DanalVbankFeeAmount",
@@ -43,7 +44,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldClrType: typeof(decimal),
                 oldType: "decimal(18,0)",
                 oldPrecision: 18,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "가상계좌 수수료(원)");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "Payment_DanalTransferFeeRate",
@@ -57,7 +59,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldType: "decimal(5,2)",
                 oldPrecision: 5,
                 oldScale: 2,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "계좌이체 수수료(%)");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "Payment_DanalTransferFeeAmount",
@@ -70,7 +73,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldClrType: typeof(decimal),
                 oldType: "decimal(18,0)",
                 oldPrecision: 18,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "계좌이체 수수료(원)");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "Payment_DanalCardFeeRate",
@@ -84,7 +88,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldType: "decimal(5,2)",
                 oldPrecision: 5,
                 oldScale: 2,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "신용카드 수수료(%)");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "Payment_DanalCardFeeAmount",
@@ -97,7 +102,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldClrType: typeof(decimal),
                 oldType: "decimal(18,0)",
                 oldPrecision: 18,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "신용카드 수수료(원)");
 
             migrationBuilder.AddColumn<decimal>(
                 name: "Payment_DanalKakaoPayFeeAmount",

+ 2 - 1
Infrastructure/Persistence/Migrations/20260523100307_AddGameBigImage.cs

@@ -20,7 +20,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldClrType: typeof(string),
                 oldType: "nvarchar(500)",
                 oldMaxLength: 500,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "작은 이미지 (목록 카드용)");
 
             migrationBuilder.AddColumn<string>(
                 name: "BigImage",

+ 2 - 1
Infrastructure/Persistence/Migrations/20260523134646_EnrichGameWithFdmboxFields.cs

@@ -41,7 +41,8 @@ namespace Infrastructure.Migrations.AppDb
                 oldClrType: typeof(string),
                 oldType: "nvarchar(2000)",
                 oldMaxLength: 2000,
-                oldNullable: true);
+                oldNullable: true,
+                oldComment: "게임 소개 (CKEditor HTML)");
 
             // 신규 컬럼: Code (6자 UNIQUE filtered)
             migrationBuilder.AddColumn<string>(

+ 4 - 2
Infrastructure/Persistence/Migrations/20260602050554_AddDeveloperPortalSchema.cs

@@ -287,7 +287,8 @@ namespace Infrastructure.Migrations.AppDb
                 nullable: false,
                 comment: "할인 값 (Percent: 0..99, Amount: 0..Price)",
                 oldClrType: typeof(int),
-                oldType: "int");
+                oldType: "int",
+                oldComment: "할인 값 (Percent: 0..99, Amount: 0..Price)");
 
             migrationBuilder.AlterColumn<byte>(
                 name: "DiscountType",
@@ -296,7 +297,8 @@ namespace Infrastructure.Migrations.AppDb
                 nullable: false,
                 comment: "할인 모드 (0=None, 1=Percent, 2=Amount)",
                 oldClrType: typeof(byte),
-                oldType: "tinyint");
+                oldType: "tinyint",
+                oldComment: "할인 모드 (0=None, 1=Percent, 2=Amount)");
         }
     }
 }

+ 2 - 1
Infrastructure/Persistence/Migrations/20260611115059_AlterApiCommissionRatePrecision.cs

@@ -19,7 +19,8 @@ namespace Infrastructure.Migrations.AppDb
                 nullable: false,
                 comment: "API 결제 보고 채널 수수료율(%) — 0~100, 0=비대상",
                 oldClrType: typeof(decimal),
-                oldType: "decimal(18,2)");
+                oldType: "decimal(18,2)",
+                oldComment: "API 결제 보고 채널 수수료율(%) — 0~100, 0=비대상");
 
             migrationBuilder.AlterColumn<decimal>(
                 name: "CommissionRate",

+ 2 - 1
Infrastructure/Persistence/Migrations/20260705002416_AddConsumableItemsAndProfileCooldown.cs

@@ -18,7 +18,8 @@ namespace Infrastructure.Migrations.AppDb
                 nullable: true,
                 comment: "게임 ID (선택 — null=플랫폼 직접판매)",
                 oldClrType: typeof(int),
-                oldType: "int");
+                oldType: "int",
+                oldComment: "게임 ID (선택 — null=플랫폼 직접판매)");
 
             migrationBuilder.AddColumn<int>(
                 name: "DurationDays",