80 lines
2.8 KiB
C#
80 lines
2.8 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Church.Net.DAL.EFCoreDBF.Migrations
|
|
{
|
|
public partial class RemoveAutoReply : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PastoralDomainAutoReplys_PastoralDomains_PastoralDomainComm~",
|
|
table: "PastoralDomainAutoReplys");
|
|
|
|
migrationBuilder.DropUniqueConstraint(
|
|
name: "AK_PastoralDomains_CommunityAppId",
|
|
table: "PastoralDomains");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CommunityAppId",
|
|
table: "PastoralDomains");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "CommunityAppId",
|
|
table: "HappinessGroups",
|
|
newName: "LineGroupId");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "LineGroupId",
|
|
table: "PastoralDomains",
|
|
type: "text",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PastoralDomainAutoReplys_PastoralDomains_PastoralDomainComm~",
|
|
table: "PastoralDomainAutoReplys",
|
|
column: "PastoralDomainCommunityAppId",
|
|
principalTable: "PastoralDomains",
|
|
principalColumn: "Id",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropForeignKey(
|
|
name: "FK_PastoralDomainAutoReplys_PastoralDomains_PastoralDomainComm~",
|
|
table: "PastoralDomainAutoReplys");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "LineGroupId",
|
|
table: "PastoralDomains");
|
|
|
|
migrationBuilder.RenameColumn(
|
|
name: "LineGroupId",
|
|
table: "HappinessGroups",
|
|
newName: "CommunityAppId");
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CommunityAppId",
|
|
table: "PastoralDomains",
|
|
type: "text",
|
|
nullable: false,
|
|
defaultValue: "");
|
|
|
|
migrationBuilder.AddUniqueConstraint(
|
|
name: "AK_PastoralDomains_CommunityAppId",
|
|
table: "PastoralDomains",
|
|
column: "CommunityAppId");
|
|
|
|
migrationBuilder.AddForeignKey(
|
|
name: "FK_PastoralDomainAutoReplys_PastoralDomains_PastoralDomainComm~",
|
|
table: "PastoralDomainAutoReplys",
|
|
column: "PastoralDomainCommunityAppId",
|
|
principalTable: "PastoralDomains",
|
|
principalColumn: "CommunityAppId",
|
|
onDelete: ReferentialAction.Cascade);
|
|
}
|
|
}
|
|
}
|