Premier commit
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace SIFinance.Shared.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddResponsableToUtilisateurs : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "responsable_id",
|
||||
schema: "core",
|
||||
table: "utilisateurs",
|
||||
type: "int",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_utilisateurs_responsable_id",
|
||||
schema: "core",
|
||||
table: "utilisateurs",
|
||||
column: "responsable_id");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK__utilisateurs__responsable",
|
||||
schema: "core",
|
||||
table: "utilisateurs",
|
||||
column: "responsable_id",
|
||||
principalSchema: "core",
|
||||
principalTable: "utilisateurs",
|
||||
principalColumn: "id");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK__utilisateurs__responsable",
|
||||
schema: "core",
|
||||
table: "utilisateurs");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_utilisateurs_responsable_id",
|
||||
schema: "core",
|
||||
table: "utilisateurs");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "responsable_id",
|
||||
schema: "core",
|
||||
table: "utilisateurs");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user