20260330201751_AddRankConfigFontAndDisplayFields.cs 6.0 KB

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