20260330201751_AddRankConfigFontAndDisplayFields.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace Infrastructure.Migrations.AppDb;
  4. /// <inheritdoc />
  5. public partial class AddRankConfigFontAndDisplayFields : Migration
  6. {
  7. /// <inheritdoc />
  8. protected override void Up(MigrationBuilder migrationBuilder)
  9. {
  10. migrationBuilder.AddColumn<bool>(
  11. name: "IsShowDonationCount",
  12. table: "DonationRankConfig",
  13. type: "bit",
  14. nullable: false,
  15. defaultValue: false);
  16. migrationBuilder.AddColumn<bool>(
  17. name: "IsShowGradeIcon",
  18. table: "DonationRankConfig",
  19. type: "bit",
  20. nullable: false,
  21. defaultValue: false);
  22. migrationBuilder.AddColumn<bool>(
  23. name: "IsShowMemberIcon",
  24. table: "DonationRankConfig",
  25. type: "bit",
  26. nullable: false,
  27. defaultValue: false);
  28. migrationBuilder.AddColumn<int>(
  29. name: "NameDisplayType",
  30. table: "DonationRankConfig",
  31. type: "int",
  32. nullable: false,
  33. defaultValue: 0);
  34. migrationBuilder.AddColumn<string>(
  35. name: "Rank1FontColor",
  36. table: "DonationRankConfig",
  37. type: "nvarchar(max)",
  38. nullable: false,
  39. defaultValue: "");
  40. migrationBuilder.AddColumn<string>(
  41. name: "Rank1FontFamily",
  42. table: "DonationRankConfig",
  43. type: "nvarchar(max)",
  44. nullable: true);
  45. migrationBuilder.AddColumn<int>(
  46. name: "Rank1FontSizePx",
  47. table: "DonationRankConfig",
  48. type: "int",
  49. nullable: false,
  50. defaultValue: 0);
  51. migrationBuilder.AddColumn<string>(
  52. name: "Rank2FontColor",
  53. table: "DonationRankConfig",
  54. type: "nvarchar(max)",
  55. nullable: false,
  56. defaultValue: "");
  57. migrationBuilder.AddColumn<string>(
  58. name: "Rank2FontFamily",
  59. table: "DonationRankConfig",
  60. type: "nvarchar(max)",
  61. nullable: true);
  62. migrationBuilder.AddColumn<int>(
  63. name: "Rank2FontSizePx",
  64. table: "DonationRankConfig",
  65. type: "int",
  66. nullable: false,
  67. defaultValue: 0);
  68. migrationBuilder.AddColumn<string>(
  69. name: "Rank3FontColor",
  70. table: "DonationRankConfig",
  71. type: "nvarchar(max)",
  72. nullable: false,
  73. defaultValue: "");
  74. migrationBuilder.AddColumn<string>(
  75. name: "Rank3FontFamily",
  76. table: "DonationRankConfig",
  77. type: "nvarchar(max)",
  78. nullable: true);
  79. migrationBuilder.AddColumn<int>(
  80. name: "Rank3FontSizePx",
  81. table: "DonationRankConfig",
  82. type: "int",
  83. nullable: false,
  84. defaultValue: 0);
  85. migrationBuilder.AddColumn<string>(
  86. name: "TitleFontColor",
  87. table: "DonationRankConfig",
  88. type: "nvarchar(max)",
  89. nullable: false,
  90. defaultValue: "");
  91. migrationBuilder.AddColumn<string>(
  92. name: "TitleFontFamily",
  93. table: "DonationRankConfig",
  94. type: "nvarchar(max)",
  95. nullable: true);
  96. migrationBuilder.AddColumn<int>(
  97. name: "TitleFontSizePx",
  98. table: "DonationRankConfig",
  99. type: "int",
  100. nullable: false,
  101. defaultValue: 0);
  102. }
  103. /// <inheritdoc />
  104. protected override void Down(MigrationBuilder migrationBuilder)
  105. {
  106. migrationBuilder.DropColumn(
  107. name: "IsShowDonationCount",
  108. table: "DonationRankConfig");
  109. migrationBuilder.DropColumn(
  110. name: "IsShowGradeIcon",
  111. table: "DonationRankConfig");
  112. migrationBuilder.DropColumn(
  113. name: "IsShowMemberIcon",
  114. table: "DonationRankConfig");
  115. migrationBuilder.DropColumn(
  116. name: "NameDisplayType",
  117. table: "DonationRankConfig");
  118. migrationBuilder.DropColumn(
  119. name: "Rank1FontColor",
  120. table: "DonationRankConfig");
  121. migrationBuilder.DropColumn(
  122. name: "Rank1FontFamily",
  123. table: "DonationRankConfig");
  124. migrationBuilder.DropColumn(
  125. name: "Rank1FontSizePx",
  126. table: "DonationRankConfig");
  127. migrationBuilder.DropColumn(
  128. name: "Rank2FontColor",
  129. table: "DonationRankConfig");
  130. migrationBuilder.DropColumn(
  131. name: "Rank2FontFamily",
  132. table: "DonationRankConfig");
  133. migrationBuilder.DropColumn(
  134. name: "Rank2FontSizePx",
  135. table: "DonationRankConfig");
  136. migrationBuilder.DropColumn(
  137. name: "Rank3FontColor",
  138. table: "DonationRankConfig");
  139. migrationBuilder.DropColumn(
  140. name: "Rank3FontFamily",
  141. table: "DonationRankConfig");
  142. migrationBuilder.DropColumn(
  143. name: "Rank3FontSizePx",
  144. table: "DonationRankConfig");
  145. migrationBuilder.DropColumn(
  146. name: "TitleFontColor",
  147. table: "DonationRankConfig");
  148. migrationBuilder.DropColumn(
  149. name: "TitleFontFamily",
  150. table: "DonationRankConfig");
  151. migrationBuilder.DropColumn(
  152. name: "TitleFontSizePx",
  153. table: "DonationRankConfig");
  154. }
  155. }