20201025000704_DoubleConversion_2.cs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace GreenTree.Strohrmann.ERP.Domain.Migrations
  3. {
  4. public partial class DoubleConversion_2 : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.AlterColumn<float>(
  9. name: "Value",
  10. table: "Taxes",
  11. nullable: false,
  12. oldClrType: typeof(decimal),
  13. oldType: "decimal(65,30)");
  14. migrationBuilder.AlterColumn<float>(
  15. name: "Value",
  16. table: "EmployeeDegrees",
  17. nullable: false,
  18. oldClrType: typeof(decimal),
  19. oldType: "decimal(65,30)");
  20. migrationBuilder.AlterColumn<float>(
  21. name: "Value",
  22. table: "CraftEmployees",
  23. nullable: false,
  24. oldClrType: typeof(decimal),
  25. oldType: "decimal(65,30)");
  26. migrationBuilder.AlterColumn<float>(
  27. name: "Amount",
  28. table: "CraftEmployees",
  29. nullable: false,
  30. oldClrType: typeof(decimal),
  31. oldType: "decimal(65,30)");
  32. migrationBuilder.UpdateData(
  33. table: "EmployeeDegrees",
  34. keyColumn: "Id",
  35. keyValue: 1,
  36. column: "Value",
  37. value: 60f);
  38. migrationBuilder.UpdateData(
  39. table: "EmployeeDegrees",
  40. keyColumn: "Id",
  41. keyValue: 2,
  42. column: "Value",
  43. value: 30f);
  44. migrationBuilder.UpdateData(
  45. table: "EmployeeDegrees",
  46. keyColumn: "Id",
  47. keyValue: 3,
  48. column: "Value",
  49. value: 15f);
  50. migrationBuilder.UpdateData(
  51. table: "Taxes",
  52. keyColumn: "Id",
  53. keyValue: 1,
  54. column: "Value",
  55. value: 0.19f);
  56. migrationBuilder.UpdateData(
  57. table: "Taxes",
  58. keyColumn: "Id",
  59. keyValue: 2,
  60. column: "Value",
  61. value: 0.16f);
  62. }
  63. protected override void Down(MigrationBuilder migrationBuilder)
  64. {
  65. migrationBuilder.AlterColumn<decimal>(
  66. name: "Value",
  67. table: "Taxes",
  68. type: "decimal(65,30)",
  69. nullable: false,
  70. oldClrType: typeof(float));
  71. migrationBuilder.AlterColumn<decimal>(
  72. name: "Value",
  73. table: "EmployeeDegrees",
  74. type: "decimal(65,30)",
  75. nullable: false,
  76. oldClrType: typeof(float));
  77. migrationBuilder.AlterColumn<decimal>(
  78. name: "Value",
  79. table: "CraftEmployees",
  80. type: "decimal(65,30)",
  81. nullable: false,
  82. oldClrType: typeof(float));
  83. migrationBuilder.AlterColumn<decimal>(
  84. name: "Amount",
  85. table: "CraftEmployees",
  86. type: "decimal(65,30)",
  87. nullable: false,
  88. oldClrType: typeof(float));
  89. migrationBuilder.UpdateData(
  90. table: "EmployeeDegrees",
  91. keyColumn: "Id",
  92. keyValue: 1,
  93. column: "Value",
  94. value: 60m);
  95. migrationBuilder.UpdateData(
  96. table: "EmployeeDegrees",
  97. keyColumn: "Id",
  98. keyValue: 2,
  99. column: "Value",
  100. value: 30m);
  101. migrationBuilder.UpdateData(
  102. table: "EmployeeDegrees",
  103. keyColumn: "Id",
  104. keyValue: 3,
  105. column: "Value",
  106. value: 15m);
  107. migrationBuilder.UpdateData(
  108. table: "Taxes",
  109. keyColumn: "Id",
  110. keyValue: 1,
  111. column: "Value",
  112. value: 0.19m);
  113. migrationBuilder.UpdateData(
  114. table: "Taxes",
  115. keyColumn: "Id",
  116. keyValue: 2,
  117. column: "Value",
  118. value: 0.16m);
  119. }
  120. }
  121. }