using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Church.Net.DAL.EFCoreDBF.Migrations { public partial class AddCost : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Contributions", columns: table => new { Id = table.Column(type: "text", nullable: false), GroupId = table.Column(type: "text", nullable: true), Contributor = table.Column(type: "text", nullable: true), Amount = table.Column(type: "numeric", nullable: false) }, constraints: table => { table.PrimaryKey("PK_Contributions", x => x.Id); table.ForeignKey( name: "FK_Contributions_PastoralDomains_GroupId", column: x => x.GroupId, principalTable: "PastoralDomains", principalColumn: "Id"); }); migrationBuilder.CreateTable( name: "HappinessCosts", columns: table => new { Id = table.Column(type: "text", nullable: false), WeekId = table.Column(type: "text", nullable: true), Tasker = table.Column(type: "text", nullable: true), Content = table.Column(type: "text", nullable: true), Amount = table.Column(type: "numeric", nullable: false) }, constraints: table => { table.PrimaryKey("PK_HappinessCosts", x => x.Id); table.ForeignKey( name: "FK_HappinessCosts_HappinessWeeks_WeekId", column: x => x.WeekId, principalTable: "HappinessWeeks", principalColumn: "Id"); }); migrationBuilder.CreateIndex( name: "IX_Contributions_GroupId", table: "Contributions", column: "GroupId"); migrationBuilder.CreateIndex( name: "IX_HappinessCosts_WeekId", table: "HappinessCosts", column: "WeekId"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Contributions"); migrationBuilder.DropTable( name: "HappinessCosts"); } } }