20260611115059_AlterApiCommissionRatePrecision.cs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Infrastructure.Migrations.AppDb
  4. {
  5. /// <inheritdoc />
  6. public partial class AlterApiCommissionRatePrecision : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<decimal>(
  12. name: "ApiCommissionRate",
  13. table: "Game",
  14. type: "decimal(10,7)",
  15. precision: 10,
  16. scale: 7,
  17. nullable: false,
  18. comment: "API 결제 보고 채널 수수료율(%) — 0~100, 0=비대상",
  19. oldClrType: typeof(decimal),
  20. oldType: "decimal(18,2)");
  21. migrationBuilder.AlterColumn<decimal>(
  22. name: "CommissionRate",
  23. table: "ApiPurchase",
  24. type: "decimal(10,7)",
  25. precision: 10,
  26. scale: 7,
  27. nullable: false,
  28. oldClrType: typeof(decimal),
  29. oldType: "decimal(5,2)",
  30. oldPrecision: 5,
  31. oldScale: 2);
  32. }
  33. /// <inheritdoc />
  34. protected override void Down(MigrationBuilder migrationBuilder)
  35. {
  36. migrationBuilder.AlterColumn<decimal>(
  37. name: "ApiCommissionRate",
  38. table: "Game",
  39. type: "decimal(18,2)",
  40. nullable: false,
  41. oldClrType: typeof(decimal),
  42. oldType: "decimal(10,7)",
  43. oldPrecision: 10,
  44. oldScale: 7,
  45. oldComment: "API 결제 보고 채널 수수료율(%) — 0~100, 0=비대상");
  46. migrationBuilder.AlterColumn<decimal>(
  47. name: "CommissionRate",
  48. table: "ApiPurchase",
  49. type: "decimal(5,2)",
  50. precision: 5,
  51. scale: 2,
  52. nullable: false,
  53. oldClrType: typeof(decimal),
  54. oldType: "decimal(10,7)",
  55. oldPrecision: 10,
  56. oldScale: 7);
  57. }
  58. }
  59. }