Church.Net.API/Church.Net.WebAPI/DAL/Migrations/20220827004541_AddPrayer.cs
2025-11-02 17:05:06 -08:00

39 lines
1.5 KiB
C#

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<string>(type: "text", nullable: false),
MemberId = table.Column<string>(type: "text", nullable: false),
Prayer = table.Column<string>(type: "text", nullable: true),
Comment = table.Column<string>(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");
}
}
}