using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace DiunaBI.Infrastructure.Migrations
{
///
public partial class DataSetIdOnDataRow : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows");
migrationBuilder.AlterColumn(
name: "DataSetId",
table: "DataRows",
type: "uniqueidentifier",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uniqueidentifier",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows",
column: "DataSetId",
principalTable: "DataSets",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows");
migrationBuilder.AlterColumn(
name: "DataSetId",
table: "DataRows",
type: "uniqueidentifier",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uniqueidentifier");
migrationBuilder.AddForeignKey(
name: "FK_DataRows_DataSets_DataSetId",
table: "DataRows",
column: "DataSetId",
principalTable: "DataSets",
principalColumn: "Id");
}
}
}