using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace CMSMicroservice.Infrastructure.Persistence.Migrations { /// public partial class RemoveParentIdFromUser : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Users_Users_ParentId", schema: "CMS", table: "Users"); migrationBuilder.DropIndex( name: "IX_Users_ParentId", schema: "CMS", table: "Users"); migrationBuilder.DropColumn( name: "ParentId", schema: "CMS", table: "Users"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "ParentId", schema: "CMS", table: "Users", type: "bigint", nullable: true); migrationBuilder.CreateIndex( name: "IX_Users_ParentId", schema: "CMS", table: "Users", column: "ParentId"); migrationBuilder.AddForeignKey( name: "FK_Users_Users_ParentId", schema: "CMS", table: "Users", column: "ParentId", principalSchema: "CMS", principalTable: "Users", principalColumn: "Id"); } } }