using Microsoft.EntityFrameworkCore.Migrations; namespace DaSaSo.EntityFramework.Migrations { public partial class LineraddedToSewer : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "PipeLinerId", table: "SewerObjects", type: "integer", nullable: true); migrationBuilder.CreateIndex( name: "IX_SewerObjects_PipeLinerId", table: "SewerObjects", column: "PipeLinerId"); migrationBuilder.AddForeignKey( name: "FK_SewerObjects_PipeLiners_PipeLinerId", table: "SewerObjects", column: "PipeLinerId", principalTable: "PipeLiners", principalColumn: "Id", onDelete: ReferentialAction.Restrict); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_SewerObjects_PipeLiners_PipeLinerId", table: "SewerObjects"); migrationBuilder.DropIndex( name: "IX_SewerObjects_PipeLinerId", table: "SewerObjects"); migrationBuilder.DropColumn( name: "PipeLinerId", table: "SewerObjects"); } } }