using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace LANCommander.Migrations { /// public partial class AddPageHierarchy : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ParentId", table: "Pages", type: "TEXT", nullable: true); migrationBuilder.CreateIndex( name: "IX_Pages_ParentId", table: "Pages", column: "ParentId"); migrationBuilder.AddForeignKey( name: "FK_Pages_Pages_ParentId", table: "Pages", column: "ParentId", principalTable: "Pages", principalColumn: "Id", onDelete: ReferentialAction.Cascade); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Pages_Pages_ParentId", table: "Pages"); migrationBuilder.DropIndex( name: "IX_Pages_ParentId", table: "Pages"); migrationBuilder.DropColumn( name: "ParentId", table: "Pages"); } } }