using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace SimpleLIS.Migrations { /// public partial class Patientsgotmessages : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "PatientId", table: "Messages", type: "INTEGER", nullable: false, defaultValue: 0); migrationBuilder.CreateIndex( name: "IX_Messages_PatientId", table: "Messages", column: "PatientId"); migrationBuilder.AddForeignKey( name: "FK_Messages_Patients_PatientId", table: "Messages", column: "PatientId", principalTable: "Patients", principalColumn: "PatientId", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Messages_Patients_PatientId", table: "Messages"); migrationBuilder.DropIndex( name: "IX_Messages_PatientId", table: "Messages"); migrationBuilder.DropColumn( name: "PatientId", table: "Messages"); } } }