20240212110250_updateUserConfig.cs 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. #nullable disable
  3. namespace MTWorkHR.Identity.Migrations
  4. {
  5. /// <inheritdoc />
  6. public partial class updateUserConfig : Migration
  7. {
  8. /// <inheritdoc />
  9. protected override void Up(MigrationBuilder migrationBuilder)
  10. {
  11. migrationBuilder.AlterColumn<decimal>(
  12. name: "TaxNumber",
  13. table: "AspNetUsers",
  14. type: "decimal(18,2)",
  15. nullable: true,
  16. oldClrType: typeof(decimal),
  17. oldType: "decimal(18,2)");
  18. migrationBuilder.AlterColumn<int>(
  19. name: "QualificationId",
  20. table: "AspNetUsers",
  21. type: "int",
  22. nullable: true,
  23. oldClrType: typeof(int),
  24. oldType: "int");
  25. migrationBuilder.AlterColumn<decimal>(
  26. name: "IncomeTaxValue",
  27. table: "AspNetUsers",
  28. type: "decimal(18,2)",
  29. nullable: true,
  30. oldClrType: typeof(decimal),
  31. oldType: "decimal(18,2)");
  32. migrationBuilder.UpdateData(
  33. table: "AspNetUsers",
  34. keyColumn: "Id",
  35. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  36. columns: new[] { "IncomeTaxValue", "QualificationId", "TaxNumber" },
  37. values: new object[] { 1m, 1, 111m });
  38. migrationBuilder.UpdateData(
  39. table: "AspNetUsers",
  40. keyColumn: "Id",
  41. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  42. columns: new[] { "IncomeTaxValue", "QualificationId", "TaxNumber" },
  43. values: new object[] { 100m, 1, 222m });
  44. }
  45. /// <inheritdoc />
  46. protected override void Down(MigrationBuilder migrationBuilder)
  47. {
  48. migrationBuilder.AlterColumn<decimal>(
  49. name: "TaxNumber",
  50. table: "AspNetUsers",
  51. type: "decimal(18,2)",
  52. nullable: false,
  53. defaultValue: 0m,
  54. oldClrType: typeof(decimal),
  55. oldType: "decimal(18,2)",
  56. oldNullable: true);
  57. migrationBuilder.AlterColumn<int>(
  58. name: "QualificationId",
  59. table: "AspNetUsers",
  60. type: "int",
  61. nullable: false,
  62. defaultValue: 0,
  63. oldClrType: typeof(int),
  64. oldType: "int",
  65. oldNullable: true);
  66. migrationBuilder.AlterColumn<decimal>(
  67. name: "IncomeTaxValue",
  68. table: "AspNetUsers",
  69. type: "decimal(18,2)",
  70. nullable: false,
  71. defaultValue: 0m,
  72. oldClrType: typeof(decimal),
  73. oldType: "decimal(18,2)",
  74. oldNullable: true);
  75. migrationBuilder.UpdateData(
  76. table: "AspNetUsers",
  77. keyColumn: "Id",
  78. keyValue: "ADMB3B92-2311-48F8-9DEC-F9FAEF1F21UA",
  79. columns: new[] { "IncomeTaxValue", "QualificationId", "TaxNumber" },
  80. values: new object[] { 0m, 0, 0m });
  81. migrationBuilder.UpdateData(
  82. table: "AspNetUsers",
  83. keyColumn: "Id",
  84. keyValue: "AL5B3B92-2311-48F8-9DEC-F9FAEF1F21UB",
  85. columns: new[] { "IncomeTaxValue", "QualificationId", "TaxNumber" },
  86. values: new object[] { 0m, 0, 0m });
  87. }
  88. }
  89. }