using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ManagerService.Migrations
{
///
public partial class UpdateMix : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Sections_Content_ContentId1",
table: "Sections");
migrationBuilder.DropForeignKey(
name: "FK_Sections_Resources_ResourceId",
table: "Sections");
migrationBuilder.DropIndex(
name: "IX_Sections_ContentId1",
table: "Sections");
migrationBuilder.DropIndex(
name: "IX_Sections_ResourceId",
table: "Sections");
migrationBuilder.DropColumn(
name: "Cols",
table: "Sections");
migrationBuilder.RenameColumn(
name: "resourceIds",
table: "Sections",
newName: "QuizMediumLevel");
migrationBuilder.RenameColumn(
name: "mapProvider",
table: "Sections",
newName: "PuzzleRows");
migrationBuilder.RenameColumn(
name: "isReadAudioAuto",
table: "Sections",
newName: "ArticleIsReadAudioAuto");
migrationBuilder.RenameColumn(
name: "isContentTop",
table: "Sections",
newName: "ArticleIsContentTop");
migrationBuilder.RenameColumn(
name: "content",
table: "Sections",
newName: "QuizGreatLevel");
migrationBuilder.RenameColumn(
name: "audioIds",
table: "Sections",
newName: "QuizGoodLevel");
migrationBuilder.RenameColumn(
name: "Zoom",
table: "Sections",
newName: "PuzzleCols");
migrationBuilder.RenameColumn(
name: "UpdatedDate",
table: "Sections",
newName: "WeatherUpdatedDate");
migrationBuilder.RenameColumn(
name: "Source",
table: "Sections",
newName: "WebSource");
migrationBuilder.RenameColumn(
name: "SectionWeb_Source",
table: "Sections",
newName: "WeatherResult");
migrationBuilder.RenameColumn(
name: "Rows",
table: "Sections",
newName: "MapZoom");
migrationBuilder.RenameColumn(
name: "Result",
table: "Sections",
newName: "WeatherCity");
migrationBuilder.RenameColumn(
name: "ResourceId",
table: "Sections",
newName: "VideoSource");
migrationBuilder.RenameColumn(
name: "MessageFin",
table: "Sections",
newName: "QuizBadLevel");
migrationBuilder.RenameColumn(
name: "MessageDebut",
table: "Sections",
newName: "PuzzleMessageFin");
migrationBuilder.RenameColumn(
name: "MediumLevel",
table: "Sections",
newName: "PuzzleMessageDebut");
migrationBuilder.RenameColumn(
name: "MapType",
table: "Sections",
newName: "MapMapType");
migrationBuilder.RenameColumn(
name: "MapProvider",
table: "Sections",
newName: "MapMapProvider");
migrationBuilder.RenameColumn(
name: "GreatLevel",
table: "Sections",
newName: "ArticleContent");
migrationBuilder.RenameColumn(
name: "GoodLevel",
table: "Sections",
newName: "ArticleAudioIds");
migrationBuilder.RenameColumn(
name: "ContentId1",
table: "Sections",
newName: "AgendaMapProvider");
migrationBuilder.RenameColumn(
name: "ContentId",
table: "Sections",
newName: "PuzzleImageId");
migrationBuilder.RenameColumn(
name: "City",
table: "Sections",
newName: "MapResourceId");
migrationBuilder.RenameColumn(
name: "CenterLongitude",
table: "Sections",
newName: "MapCenterLongitude");
migrationBuilder.RenameColumn(
name: "CenterLatitude",
table: "Sections",
newName: "MapCenterLatitude");
migrationBuilder.RenameColumn(
name: "BadLevel",
table: "Sections",
newName: "AgendaResourceIds");
migrationBuilder.CreateIndex(
name: "IX_Sections_MapResourceId",
table: "Sections",
column: "MapResourceId");
migrationBuilder.CreateIndex(
name: "IX_Sections_PuzzleImageId",
table: "Sections",
column: "PuzzleImageId");
migrationBuilder.AddForeignKey(
name: "FK_Sections_Resources_MapResourceId",
table: "Sections",
column: "MapResourceId",
principalTable: "Resources",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Sections_Resources_PuzzleImageId",
table: "Sections",
column: "PuzzleImageId",
principalTable: "Resources",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Sections_Resources_MapResourceId",
table: "Sections");
migrationBuilder.DropForeignKey(
name: "FK_Sections_Resources_PuzzleImageId",
table: "Sections");
migrationBuilder.DropIndex(
name: "IX_Sections_MapResourceId",
table: "Sections");
migrationBuilder.DropIndex(
name: "IX_Sections_PuzzleImageId",
table: "Sections");
migrationBuilder.RenameColumn(
name: "WebSource",
table: "Sections",
newName: "Source");
migrationBuilder.RenameColumn(
name: "WeatherUpdatedDate",
table: "Sections",
newName: "UpdatedDate");
migrationBuilder.RenameColumn(
name: "WeatherResult",
table: "Sections",
newName: "SectionWeb_Source");
migrationBuilder.RenameColumn(
name: "WeatherCity",
table: "Sections",
newName: "Result");
migrationBuilder.RenameColumn(
name: "VideoSource",
table: "Sections",
newName: "ResourceId");
migrationBuilder.RenameColumn(
name: "QuizMediumLevel",
table: "Sections",
newName: "resourceIds");
migrationBuilder.RenameColumn(
name: "QuizGreatLevel",
table: "Sections",
newName: "content");
migrationBuilder.RenameColumn(
name: "QuizGoodLevel",
table: "Sections",
newName: "audioIds");
migrationBuilder.RenameColumn(
name: "QuizBadLevel",
table: "Sections",
newName: "MessageFin");
migrationBuilder.RenameColumn(
name: "PuzzleRows",
table: "Sections",
newName: "mapProvider");
migrationBuilder.RenameColumn(
name: "PuzzleMessageFin",
table: "Sections",
newName: "MessageDebut");
migrationBuilder.RenameColumn(
name: "PuzzleMessageDebut",
table: "Sections",
newName: "MediumLevel");
migrationBuilder.RenameColumn(
name: "PuzzleImageId",
table: "Sections",
newName: "ContentId");
migrationBuilder.RenameColumn(
name: "PuzzleCols",
table: "Sections",
newName: "Zoom");
migrationBuilder.RenameColumn(
name: "MapZoom",
table: "Sections",
newName: "Rows");
migrationBuilder.RenameColumn(
name: "MapResourceId",
table: "Sections",
newName: "City");
migrationBuilder.RenameColumn(
name: "MapMapType",
table: "Sections",
newName: "MapType");
migrationBuilder.RenameColumn(
name: "MapMapProvider",
table: "Sections",
newName: "MapProvider");
migrationBuilder.RenameColumn(
name: "MapCenterLongitude",
table: "Sections",
newName: "CenterLongitude");
migrationBuilder.RenameColumn(
name: "MapCenterLatitude",
table: "Sections",
newName: "CenterLatitude");
migrationBuilder.RenameColumn(
name: "ArticleIsReadAudioAuto",
table: "Sections",
newName: "isReadAudioAuto");
migrationBuilder.RenameColumn(
name: "ArticleIsContentTop",
table: "Sections",
newName: "isContentTop");
migrationBuilder.RenameColumn(
name: "ArticleContent",
table: "Sections",
newName: "GreatLevel");
migrationBuilder.RenameColumn(
name: "ArticleAudioIds",
table: "Sections",
newName: "GoodLevel");
migrationBuilder.RenameColumn(
name: "AgendaResourceIds",
table: "Sections",
newName: "BadLevel");
migrationBuilder.RenameColumn(
name: "AgendaMapProvider",
table: "Sections",
newName: "ContentId1");
migrationBuilder.AddColumn(
name: "Cols",
table: "Sections",
type: "integer",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Sections_ContentId1",
table: "Sections",
column: "ContentId1");
migrationBuilder.CreateIndex(
name: "IX_Sections_ResourceId",
table: "Sections",
column: "ResourceId");
migrationBuilder.AddForeignKey(
name: "FK_Sections_Content_ContentId1",
table: "Sections",
column: "ContentId1",
principalTable: "Content",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_Sections_Resources_ResourceId",
table: "Sections",
column: "ResourceId",
principalTable: "Resources",
principalColumn: "Id");
}
}
}