prvi
This commit is contained in:
56
EveryThing/Migrations/20220615133522_4.cs
Normal file
56
EveryThing/Migrations/20220615133522_4.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _4 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: true,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem",
|
||||
principalTable: "ProjectPartItems",
|
||||
principalColumn: "IdProjectPartItem");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems");
|
||||
|
||||
migrationBuilder.AlterColumn<int>(
|
||||
name: "IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0,
|
||||
oldClrType: typeof(int),
|
||||
oldType: "int",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_InvoiceItems_ProjectPartItems_IdProjectPartItem",
|
||||
table: "InvoiceItems",
|
||||
column: "IdProjectPartItem",
|
||||
principalTable: "ProjectPartItems",
|
||||
principalColumn: "IdProjectPartItem",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user