using System.Collections.Generic; using ManagerService.Data; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ManagerService.Migrations { /// public partial class UpdateMix2 : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "Contents", table: "GeoPoint"); migrationBuilder.AddColumn( name: "GeoPointId", table: "Resources", type: "integer", nullable: true); migrationBuilder.CreateIndex( name: "IX_Resources_GeoPointId", table: "Resources", column: "GeoPointId"); migrationBuilder.AddForeignKey( name: "FK_Resources_GeoPoint_GeoPointId", table: "Resources", column: "GeoPointId", principalTable: "GeoPoint", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Resources_GeoPoint_GeoPointId", table: "Resources"); migrationBuilder.DropIndex( name: "IX_Resources_GeoPointId", table: "Resources"); migrationBuilder.DropColumn( name: "GeoPointId", table: "Resources"); migrationBuilder.AddColumn>( name: "Contents", table: "GeoPoint", type: "jsonb", nullable: false); } } }