102 lines
3.2 KiB
C#
102 lines
3.2 KiB
C#
using System.Collections.Generic;
|
|
using ManagerService.DTOs;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace ManagerService.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class MoveGameModeToGuidedPath : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
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<string>(
|
|
name: "GameMessageDebut",
|
|
table: "GuidedPaths",
|
|
type: "jsonb",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "GameMessageFin",
|
|
table: "GuidedPaths",
|
|
type: "jsonb",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<bool>(
|
|
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");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
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<bool>(
|
|
name: "IsGameMode",
|
|
table: "Sections",
|
|
type: "boolean",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<List<TranslationAndResourceDTO>>(
|
|
name: "SectionParcours_GameMessageDebut",
|
|
table: "Sections",
|
|
type: "jsonb",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<List<TranslationAndResourceDTO>>(
|
|
name: "SectionParcours_GameMessageFin",
|
|
table: "Sections",
|
|
type: "jsonb",
|
|
nullable: true);
|
|
}
|
|
}
|
|
}
|