dev
This commit is contained in:
56
EveryThing/Migrations/20260119165503_16.cs
Normal file
56
EveryThing/Migrations/20260119165503_16.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace EveryThing.Migrations
|
||||
{
|
||||
public partial class _16 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "IdProjectFk",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ProjectIdProject",
|
||||
table: "Invoices",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Invoices_ProjectIdProject",
|
||||
table: "Invoices",
|
||||
column: "ProjectIdProject");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Invoices_Projects_ProjectIdProject",
|
||||
table: "Invoices",
|
||||
column: "ProjectIdProject",
|
||||
principalTable: "Projects",
|
||||
principalColumn: "IdProject",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Invoices_Projects_ProjectIdProject",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Invoices_ProjectIdProject",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IdProjectFk",
|
||||
table: "Invoices");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "ProjectIdProject",
|
||||
table: "Invoices");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user