API

20200909062006_AddSpouseDetails.cs 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace UnivateProperties_API.Migrations
  3. {
  4. public partial class AddSpouseDetails : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.AddColumn<int>(
  9. name: "HowMarried",
  10. table: "Person",
  11. nullable: false,
  12. defaultValue: 0);
  13. migrationBuilder.AddColumn<string>(
  14. name: "SpouseCellnumber",
  15. table: "Person",
  16. nullable: true);
  17. migrationBuilder.AddColumn<string>(
  18. name: "SpouseEmail",
  19. table: "Person",
  20. nullable: true);
  21. migrationBuilder.AddColumn<string>(
  22. name: "SpouseName",
  23. table: "Person",
  24. nullable: true);
  25. migrationBuilder.AddColumn<string>(
  26. name: "SpouseSurname",
  27. table: "Person",
  28. nullable: true);
  29. migrationBuilder.AddColumn<string>(
  30. name: "SpouseTelephone",
  31. table: "Person",
  32. nullable: true);
  33. migrationBuilder.AddColumn<int>(
  34. name: "HowMarried",
  35. table: "Individuals",
  36. nullable: false,
  37. defaultValue: 0);
  38. migrationBuilder.AddColumn<string>(
  39. name: "SpouseCellnumber",
  40. table: "Individuals",
  41. nullable: true);
  42. migrationBuilder.AddColumn<string>(
  43. name: "SpouseEmail",
  44. table: "Individuals",
  45. nullable: true);
  46. migrationBuilder.AddColumn<string>(
  47. name: "SpouseName",
  48. table: "Individuals",
  49. nullable: true);
  50. migrationBuilder.AddColumn<string>(
  51. name: "SpouseSurname",
  52. table: "Individuals",
  53. nullable: true);
  54. migrationBuilder.AddColumn<string>(
  55. name: "SpouseTelephone",
  56. table: "Individuals",
  57. nullable: true);
  58. migrationBuilder.AddColumn<int>(
  59. name: "HowMarried",
  60. table: "Agents",
  61. nullable: false,
  62. defaultValue: 0);
  63. migrationBuilder.AddColumn<string>(
  64. name: "SpouseCellnumber",
  65. table: "Agents",
  66. nullable: true);
  67. migrationBuilder.AddColumn<string>(
  68. name: "SpouseEmail",
  69. table: "Agents",
  70. nullable: true);
  71. migrationBuilder.AddColumn<string>(
  72. name: "SpouseName",
  73. table: "Agents",
  74. nullable: true);
  75. migrationBuilder.AddColumn<string>(
  76. name: "SpouseSurname",
  77. table: "Agents",
  78. nullable: true);
  79. migrationBuilder.AddColumn<string>(
  80. name: "SpouseTelephone",
  81. table: "Agents",
  82. nullable: true);
  83. }
  84. protected override void Down(MigrationBuilder migrationBuilder)
  85. {
  86. migrationBuilder.DropColumn(
  87. name: "HowMarried",
  88. table: "Person");
  89. migrationBuilder.DropColumn(
  90. name: "SpouseCellnumber",
  91. table: "Person");
  92. migrationBuilder.DropColumn(
  93. name: "SpouseEmail",
  94. table: "Person");
  95. migrationBuilder.DropColumn(
  96. name: "SpouseName",
  97. table: "Person");
  98. migrationBuilder.DropColumn(
  99. name: "SpouseSurname",
  100. table: "Person");
  101. migrationBuilder.DropColumn(
  102. name: "SpouseTelephone",
  103. table: "Person");
  104. migrationBuilder.DropColumn(
  105. name: "HowMarried",
  106. table: "Individuals");
  107. migrationBuilder.DropColumn(
  108. name: "SpouseCellnumber",
  109. table: "Individuals");
  110. migrationBuilder.DropColumn(
  111. name: "SpouseEmail",
  112. table: "Individuals");
  113. migrationBuilder.DropColumn(
  114. name: "SpouseName",
  115. table: "Individuals");
  116. migrationBuilder.DropColumn(
  117. name: "SpouseSurname",
  118. table: "Individuals");
  119. migrationBuilder.DropColumn(
  120. name: "SpouseTelephone",
  121. table: "Individuals");
  122. migrationBuilder.DropColumn(
  123. name: "HowMarried",
  124. table: "Agents");
  125. migrationBuilder.DropColumn(
  126. name: "SpouseCellnumber",
  127. table: "Agents");
  128. migrationBuilder.DropColumn(
  129. name: "SpouseEmail",
  130. table: "Agents");
  131. migrationBuilder.DropColumn(
  132. name: "SpouseName",
  133. table: "Agents");
  134. migrationBuilder.DropColumn(
  135. name: "SpouseSurname",
  136. table: "Agents");
  137. migrationBuilder.DropColumn(
  138. name: "SpouseTelephone",
  139. table: "Agents");
  140. }
  141. }
  142. }