API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20200902101725_Property-Addresses updated.cs 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace UnivateProperties_API.Migrations
  3. {
  4. public partial class PropertyAddressesupdated : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.DropColumn(
  9. name: "CityId",
  10. table: "Properties");
  11. migrationBuilder.DropColumn(
  12. name: "ProvinceId",
  13. table: "Properties");
  14. migrationBuilder.DropColumn(
  15. name: "SuburbId",
  16. table: "Properties");
  17. migrationBuilder.RenameColumn(
  18. name: "AddressLine3",
  19. table: "Properties",
  20. newName: "Suburb");
  21. migrationBuilder.RenameColumn(
  22. name: "AddressLine2",
  23. table: "Properties",
  24. newName: "StreetNumber");
  25. migrationBuilder.RenameColumn(
  26. name: "AddressLine1",
  27. table: "Properties",
  28. newName: "StreetName");
  29. migrationBuilder.AddColumn<string>(
  30. name: "AddressOther",
  31. table: "Properties",
  32. nullable: true);
  33. migrationBuilder.AddColumn<string>(
  34. name: "City",
  35. table: "Properties",
  36. nullable: true);
  37. migrationBuilder.AddColumn<string>(
  38. name: "Country",
  39. table: "Properties",
  40. nullable: true);
  41. migrationBuilder.AddColumn<string>(
  42. name: "PostalCode",
  43. table: "Properties",
  44. nullable: true);
  45. migrationBuilder.AddColumn<string>(
  46. name: "Province",
  47. table: "Properties",
  48. nullable: true);
  49. }
  50. protected override void Down(MigrationBuilder migrationBuilder)
  51. {
  52. migrationBuilder.DropColumn(
  53. name: "AddressOther",
  54. table: "Properties");
  55. migrationBuilder.DropColumn(
  56. name: "City",
  57. table: "Properties");
  58. migrationBuilder.DropColumn(
  59. name: "Country",
  60. table: "Properties");
  61. migrationBuilder.DropColumn(
  62. name: "PostalCode",
  63. table: "Properties");
  64. migrationBuilder.DropColumn(
  65. name: "Province",
  66. table: "Properties");
  67. migrationBuilder.RenameColumn(
  68. name: "Suburb",
  69. table: "Properties",
  70. newName: "AddressLine3");
  71. migrationBuilder.RenameColumn(
  72. name: "StreetNumber",
  73. table: "Properties",
  74. newName: "AddressLine2");
  75. migrationBuilder.RenameColumn(
  76. name: "StreetName",
  77. table: "Properties",
  78. newName: "AddressLine1");
  79. migrationBuilder.AddColumn<int>(
  80. name: "CityId",
  81. table: "Properties",
  82. nullable: false,
  83. defaultValue: 0);
  84. migrationBuilder.AddColumn<int>(
  85. name: "ProvinceId",
  86. table: "Properties",
  87. nullable: false,
  88. defaultValue: 0);
  89. migrationBuilder.AddColumn<int>(
  90. name: "SuburbId",
  91. table: "Properties",
  92. nullable: false,
  93. defaultValue: 0);
  94. }
  95. }
  96. }