using Microsoft.EntityFrameworkCore.Migrations; namespace UnivateProperties_API.Migrations { public partial class PropertyCoordsUpdate : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "PropertCoords", table: "Properties", nullable: true); migrationBuilder.CreateIndex( name: "IX_Properties_PropertyTypeId", table: "Properties", column: "PropertyTypeId"); migrationBuilder.AddForeignKey( name: "FK_Properties_PropertyTypes_PropertyTypeId", table: "Properties", column: "PropertyTypeId", principalTable: "PropertyTypes", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Properties_PropertyTypes_PropertyTypeId", table: "Properties"); migrationBuilder.DropIndex( name: "IX_Properties_PropertyTypeId", table: "Properties"); migrationBuilder.DropColumn( name: "PropertCoords", table: "Properties"); } } }