This commit is contained in:
2023-06-17 14:16:09 +03:00
parent 62178f1f32
commit 7ae5d3bc81
180 changed files with 12932 additions and 192 deletions
@@ -0,0 +1,60 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace MyOffice.Migrations.Postgres.Migrations
{
/// <inheritdoc />
public partial class MotionCategoryFix2 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Motions_GlobalMotions_MotionGlobalId",
table: "Motions");
migrationBuilder.AlterColumn<Guid>(
name: "MotionGlobalId",
table: "Motions",
type: "uuid",
nullable: true,
oldClrType: typeof(Guid),
oldType: "uuid");
migrationBuilder.AddForeignKey(
name: "FK_Motions_GlobalMotions_MotionGlobalId",
table: "Motions",
column: "MotionGlobalId",
principalTable: "GlobalMotions",
principalColumn: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Motions_GlobalMotions_MotionGlobalId",
table: "Motions");
migrationBuilder.AlterColumn<Guid>(
name: "MotionGlobalId",
table: "Motions",
type: "uuid",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
oldClrType: typeof(Guid),
oldType: "uuid",
oldNullable: true);
migrationBuilder.AddForeignKey(
name: "FK_Motions_GlobalMotions_MotionGlobalId",
table: "Motions",
column: "MotionGlobalId",
principalTable: "GlobalMotions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
}
}