using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace AutomobilePlantDataBaseImplements.Migrations { /// public partial class EmailAdd2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Messages_Clients_ClientId", table: "Messages"); migrationBuilder.AlterColumn( name: "ClientId", table: "Messages", type: "integer", nullable: true, oldClrType: typeof(int), oldType: "integer"); migrationBuilder.AddForeignKey( name: "FK_Messages_Clients_ClientId", table: "Messages", column: "ClientId", principalTable: "Clients", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Messages_Clients_ClientId", table: "Messages"); migrationBuilder.AlterColumn( name: "ClientId", table: "Messages", type: "integer", nullable: false, defaultValue: 0, oldClrType: typeof(int), oldType: "integer", oldNullable: true); migrationBuilder.AddForeignKey( name: "FK_Messages_Clients_ClientId", table: "Messages", column: "ClientId", principalTable: "Clients", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } } }