using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Church.Net.DAL.EFCoreDBF.Migrations { public partial class AddPrayer : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "CellGroupRoutineEventPrayers", columns: table => new { EventId = table.Column(type: "text", nullable: false), MemberId = table.Column(type: "text", nullable: false), Prayer = table.Column(type: "text", nullable: true), Comment = table.Column(type: "text", nullable: true) }, constraints: table => { table.PrimaryKey("PK_CellGroupRoutineEventPrayers", x => new { x.EventId, x.MemberId }); table.ForeignKey( name: "FK_CellGroupRoutineEventPrayers_CellGroupRoutineEvents_EventId", column: x => x.EventId, principalTable: "CellGroupRoutineEvents", principalColumn: "Id", onDelete: ReferentialAction.Cascade); }); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "CellGroupRoutineEventPrayers"); } } }