Team Registration view v1
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace TournamentOrganizer.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddTeamLeader : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "LeaderId",
|
||||
table: "Teams",
|
||||
type: "INTEGER",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Teams_LeaderId",
|
||||
table: "Teams",
|
||||
column: "LeaderId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Teams_Players_LeaderId",
|
||||
table: "Teams",
|
||||
column: "LeaderId",
|
||||
principalTable: "Players",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.SetNull);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Teams_Players_LeaderId",
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Teams_LeaderId",
|
||||
table: "Teams");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "LeaderId",
|
||||
table: "Teams");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user