using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace StandManager.Infrastructure.Migrations { /// public partial class Capoarea : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CapoareaId", table: "Utente", type: "uniqueidentifier", nullable: true); migrationBuilder.AddColumn( name: "CapoareaId", table: "Cliente", type: "uniqueidentifier", nullable: true); migrationBuilder.CreateIndex( name: "IX_Utente_CapoareaId", table: "Utente", column: "CapoareaId"); migrationBuilder.CreateIndex( name: "IX_Cliente_CapoareaId", table: "Cliente", column: "CapoareaId"); migrationBuilder.AddForeignKey( name: "FK_Cliente_Utente_CapoareaId", table: "Cliente", column: "CapoareaId", principalTable: "Utente", principalColumn: "Id"); migrationBuilder.AddForeignKey( name: "FK_Utente_Utente_CapoareaId", table: "Utente", column: "CapoareaId", principalTable: "Utente", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Cliente_Utente_CapoareaId", table: "Cliente"); migrationBuilder.DropForeignKey( name: "FK_Utente_Utente_CapoareaId", table: "Utente"); migrationBuilder.DropIndex( name: "IX_Utente_CapoareaId", table: "Utente"); migrationBuilder.DropIndex( name: "IX_Cliente_CapoareaId", table: "Cliente"); migrationBuilder.DropColumn( name: "CapoareaId", table: "Utente"); migrationBuilder.DropColumn( name: "CapoareaId", table: "Cliente"); } } }