Files
DiunaBI/DiunaBI.Infrastructure/Migrations/20230917110252_Layer.parent.cs

50 lines
1.4 KiB
C#
Raw Normal View History

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
2025-11-05 20:50:25 +01:00
namespace DiunaBI.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class Layerparent : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "parentId",
table: "Layers",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_Layers_parentId",
table: "Layers",
column: "parentId");
migrationBuilder.AddForeignKey(
name: "FK_Layers_Layers_parentId",
table: "Layers",
column: "parentId",
principalTable: "Layers",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Layers_Layers_parentId",
table: "Layers");
migrationBuilder.DropIndex(
name: "IX_Layers_parentId",
table: "Layers");
migrationBuilder.DropColumn(
name: "parentId",
table: "Layers");
}
}
}