using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PostFundManagement.Infrastructure.Database.Migrations { /// public partial class AddedUserIdAndIdNumberTenantOrgAndUserObjects : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "IdNumber", table: "Users", type: "character varying(256)", maxLength: 256, nullable: true); migrationBuilder.AddColumn( name: "UserId", table: "Organisations", type: "uuid", nullable: true); migrationBuilder.CreateIndex( name: "IX_Organisations_UserId", table: "Organisations", column: "UserId"); migrationBuilder.AddForeignKey( name: "FK_Organisations_Users_UserId", table: "Organisations", column: "UserId", principalTable: "Users", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_Organisations_Users_UserId", table: "Organisations"); migrationBuilder.DropIndex( name: "IX_Organisations_UserId", table: "Organisations"); migrationBuilder.DropColumn( name: "IdNumber", table: "Users"); migrationBuilder.DropColumn( name: "UserId", table: "Organisations"); } } }