using System.Collections.Generic; using ManagerService.DTOs; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ManagerService.Migrations { /// public partial class MoveGameModeToGuidedPath : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "IsGameMode", table: "Sections"); migrationBuilder.DropColumn( name: "SectionParcours_GameMessageDebut", table: "Sections"); migrationBuilder.DropColumn( name: "SectionParcours_GameMessageFin", table: "Sections"); migrationBuilder.AddColumn( name: "GameMessageDebut", table: "GuidedPaths", type: "jsonb", nullable: true); migrationBuilder.AddColumn( name: "GameMessageFin", table: "GuidedPaths", type: "jsonb", nullable: true); migrationBuilder.AddColumn( name: "IsGameMode", table: "GuidedPaths", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.CreateIndex( name: "IX_GuidedPaths_ImageResourceId", table: "GuidedPaths", column: "ImageResourceId"); migrationBuilder.AddForeignKey( name: "FK_GuidedPaths_Resources_ImageResourceId", table: "GuidedPaths", column: "ImageResourceId", principalTable: "Resources", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_GuidedPaths_Resources_ImageResourceId", table: "GuidedPaths"); migrationBuilder.DropIndex( name: "IX_GuidedPaths_ImageResourceId", table: "GuidedPaths"); migrationBuilder.DropColumn( name: "GameMessageDebut", table: "GuidedPaths"); migrationBuilder.DropColumn( name: "GameMessageFin", table: "GuidedPaths"); migrationBuilder.DropColumn( name: "IsGameMode", table: "GuidedPaths"); migrationBuilder.AddColumn( name: "IsGameMode", table: "Sections", type: "boolean", nullable: true); migrationBuilder.AddColumn>( name: "SectionParcours_GameMessageDebut", table: "Sections", type: "jsonb", nullable: true); migrationBuilder.AddColumn>( name: "SectionParcours_GameMessageFin", table: "Sections", type: "jsonb", nullable: true); } } }