using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ComputerShopDatabaseImplement.Migrations { /// public partial class clientmigration2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ClientId", table: "Components", type: "int", nullable: true); migrationBuilder.CreateIndex( name: "IX_Components_ClientId", table: "Components", column: "ClientId"); migrationBuilder.AddForeignKey( name: "FK_Components_Clients_ClientId", table: "Components", column: "ClientId", principalTable: "Clients", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Components_Clients_ClientId", table: "Components"); migrationBuilder.DropIndex( name: "IX_Components_ClientId", table: "Components"); migrationBuilder.DropColumn( name: "ClientId", table: "Components"); } } }