- Made parents nullable - Added a data key for the tree - Added depth for quicker layer-wise loading
36 lines
990 B
C#
36 lines
990 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace DataModel.Migrations
|
|
{
|
|
public partial class _202207AddSectionDepth : Migration
|
|
{
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "Depth",
|
|
table: "Sections",
|
|
type: "INTEGER",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Sections_Depth",
|
|
table: "Sections",
|
|
column: "Depth");
|
|
}
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropIndex(
|
|
name: "IX_Sections_Depth",
|
|
table: "Sections");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "Depth",
|
|
table: "Sections");
|
|
}
|
|
}
|
|
}
|