20260523153023_ExpandGameCommissionRatePrecision.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Infrastructure.Migrations.AppDb
  4. {
  5. /// <inheritdoc />
  6. public partial class ExpandGameCommissionRatePrecision : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<decimal>(
  12. name: "CommissionRate",
  13. table: "Game",
  14. type: "decimal(10,7)",
  15. precision: 10,
  16. scale: 7,
  17. nullable: false,
  18. comment: "게임사 수익률(%) — 0~100, 소수점 7자리",
  19. oldClrType: typeof(decimal),
  20. oldType: "decimal(5,2)",
  21. oldPrecision: 5,
  22. oldScale: 2,
  23. oldComment: "게임사 수익률(%)");
  24. }
  25. /// <inheritdoc />
  26. protected override void Down(MigrationBuilder migrationBuilder)
  27. {
  28. migrationBuilder.AlterColumn<decimal>(
  29. name: "CommissionRate",
  30. table: "Game",
  31. type: "decimal(5,2)",
  32. precision: 5,
  33. scale: 2,
  34. nullable: false,
  35. comment: "게임사 수익률(%)",
  36. oldClrType: typeof(decimal),
  37. oldType: "decimal(10,7)",
  38. oldPrecision: 10,
  39. oldScale: 7,
  40. oldComment: "게임사 수익률(%) — 0~100, 소수점 7자리");
  41. }
  42. }
  43. }