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.

20200828154257_PropertyCoordsUpdate.cs 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Microsoft.EntityFrameworkCore.Migrations;
  2. namespace UnivateProperties_API.Migrations
  3. {
  4. public partial class PropertyCoordsUpdate : Migration
  5. {
  6. protected override void Up(MigrationBuilder migrationBuilder)
  7. {
  8. migrationBuilder.AddColumn<string>(
  9. name: "PropertCoords",
  10. table: "Properties",
  11. nullable: true);
  12. migrationBuilder.CreateIndex(
  13. name: "IX_Properties_PropertyTypeId",
  14. table: "Properties",
  15. column: "PropertyTypeId");
  16. migrationBuilder.AddForeignKey(
  17. name: "FK_Properties_PropertyTypes_PropertyTypeId",
  18. table: "Properties",
  19. column: "PropertyTypeId",
  20. principalTable: "PropertyTypes",
  21. principalColumn: "Id",
  22. onDelete: ReferentialAction.Cascade);
  23. }
  24. protected override void Down(MigrationBuilder migrationBuilder)
  25. {
  26. migrationBuilder.DropForeignKey(
  27. name: "FK_Properties_PropertyTypes_PropertyTypeId",
  28. table: "Properties");
  29. migrationBuilder.DropIndex(
  30. name: "IX_Properties_PropertyTypeId",
  31. table: "Properties");
  32. migrationBuilder.DropColumn(
  33. name: "PropertCoords",
  34. table: "Properties");
  35. }
  36. }
  37. }