Leistungsverzeichnis hinzugefügt
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
namespace KanSan.Base.Migrations
|
||||
{
|
||||
public partial class LeistungsverzeichnisReferenz : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "LeistungsverzeichnisBaustellen",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<int>(nullable: false)
|
||||
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
|
||||
GuidNr = table.Column<Guid>(nullable: false),
|
||||
BaustelleID = table.Column<int>(nullable: true),
|
||||
LVPositionID = table.Column<int>(nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_LeistungsverzeichnisBaustellen", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_LeistungsverzeichnisBaustellen_Baustelle_BaustelleID",
|
||||
column: x => x.BaustelleID,
|
||||
principalTable: "Baustelle",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_LeistungsverzeichnisBaustellen_LeistungsverzeichnisPosition~",
|
||||
column: x => x.LVPositionID,
|
||||
principalTable: "LeistungsverzeichnisPositionen",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LeistungsverzeichnisBaustellen_BaustelleID",
|
||||
table: "LeistungsverzeichnisBaustellen",
|
||||
column: "BaustelleID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_LeistungsverzeichnisBaustellen_LVPositionID",
|
||||
table: "LeistungsverzeichnisBaustellen",
|
||||
column: "LVPositionID");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "LeistungsverzeichnisBaustellen");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user