using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace ManagerService.Migrations { /// public partial class AddScene3DSectionAndImmersiveAddon : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "Mode", table: "Sections", type: "integer", nullable: true); migrationBuilder.AddColumn( name: "Model3DResourceId", table: "Sections", type: "text", nullable: true); migrationBuilder.AddColumn( name: "Model3DSource", table: "Sections", type: "text", nullable: true); migrationBuilder.AddColumn( name: "HasImmersiveContent", table: "Instances", type: "boolean", nullable: false, defaultValue: false); migrationBuilder.AddColumn( name: "LocalTransform", table: "GeoPoints", type: "jsonb", nullable: true); migrationBuilder.AddColumn( name: "SectionScene3DId", table: "GeoPoints", type: "text", nullable: true); migrationBuilder.CreateIndex( name: "IX_GeoPoints_SectionScene3DId", table: "GeoPoints", column: "SectionScene3DId"); migrationBuilder.AddForeignKey( name: "FK_GeoPoints_Sections_SectionScene3DId", table: "GeoPoints", column: "SectionScene3DId", principalTable: "Sections", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_GeoPoints_Sections_SectionScene3DId", table: "GeoPoints"); migrationBuilder.DropIndex( name: "IX_GeoPoints_SectionScene3DId", table: "GeoPoints"); migrationBuilder.DropColumn( name: "Mode", table: "Sections"); migrationBuilder.DropColumn( name: "Model3DResourceId", table: "Sections"); migrationBuilder.DropColumn( name: "Model3DSource", table: "Sections"); migrationBuilder.DropColumn( name: "HasImmersiveContent", table: "Instances"); migrationBuilder.DropColumn( name: "LocalTransform", table: "GeoPoints"); migrationBuilder.DropColumn( name: "SectionScene3DId", table: "GeoPoints"); } } }