using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ManagerService.Migrations
{
///
public partial class AddedIsWebtoInstance : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_MapAnnotation_ProgrammeBlocks_ProgrammeBlockId",
table: "MapAnnotation");
migrationBuilder.DropForeignKey(
name: "FK_MapAnnotation_Resources_IconResourceId",
table: "MapAnnotation");
migrationBuilder.DropPrimaryKey(
name: "PK_MapAnnotation",
table: "MapAnnotation");
migrationBuilder.RenameTable(
name: "MapAnnotation",
newName: "MapAnnotations");
migrationBuilder.RenameIndex(
name: "IX_MapAnnotation_ProgrammeBlockId",
table: "MapAnnotations",
newName: "IX_MapAnnotations_ProgrammeBlockId");
migrationBuilder.RenameIndex(
name: "IX_MapAnnotation_IconResourceId",
table: "MapAnnotations",
newName: "IX_MapAnnotations_IconResourceId");
migrationBuilder.AddColumn(
name: "IsWeb",
table: "Instances",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddPrimaryKey(
name: "PK_MapAnnotations",
table: "MapAnnotations",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_MapAnnotations_ProgrammeBlocks_ProgrammeBlockId",
table: "MapAnnotations",
column: "ProgrammeBlockId",
principalTable: "ProgrammeBlocks",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_MapAnnotations_Resources_IconResourceId",
table: "MapAnnotations",
column: "IconResourceId",
principalTable: "Resources",
principalColumn: "Id");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_MapAnnotations_ProgrammeBlocks_ProgrammeBlockId",
table: "MapAnnotations");
migrationBuilder.DropForeignKey(
name: "FK_MapAnnotations_Resources_IconResourceId",
table: "MapAnnotations");
migrationBuilder.DropPrimaryKey(
name: "PK_MapAnnotations",
table: "MapAnnotations");
migrationBuilder.DropColumn(
name: "IsWeb",
table: "Instances");
migrationBuilder.RenameTable(
name: "MapAnnotations",
newName: "MapAnnotation");
migrationBuilder.RenameIndex(
name: "IX_MapAnnotations_ProgrammeBlockId",
table: "MapAnnotation",
newName: "IX_MapAnnotation_ProgrammeBlockId");
migrationBuilder.RenameIndex(
name: "IX_MapAnnotations_IconResourceId",
table: "MapAnnotation",
newName: "IX_MapAnnotation_IconResourceId");
migrationBuilder.AddPrimaryKey(
name: "PK_MapAnnotation",
table: "MapAnnotation",
column: "Id");
migrationBuilder.AddForeignKey(
name: "FK_MapAnnotation_ProgrammeBlocks_ProgrammeBlockId",
table: "MapAnnotation",
column: "ProgrammeBlockId",
principalTable: "ProgrammeBlocks",
principalColumn: "Id");
migrationBuilder.AddForeignKey(
name: "FK_MapAnnotation_Resources_IconResourceId",
table: "MapAnnotation",
column: "IconResourceId",
principalTable: "Resources",
principalColumn: "Id");
}
}
}