20201024232643_DoubleConversion.cs 4.3 KB

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