using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace PostFundManagement.Infrastructure.Database.Migrations { /// public partial class UpdateAuditLog : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "EntityId", table: "AuditLogs", type: "text", nullable: false, oldClrType: typeof(long), oldType: "bigint"); migrationBuilder.AddColumn( name: "TenantId", table: "AuditLogs", type: "bigint", nullable: true); migrationBuilder.CreateIndex( name: "IX_AuditLogs_TenantId", table: "AuditLogs", column: "TenantId"); migrationBuilder.AddForeignKey( name: "FK_AuditLogs_Tenants_TenantId", table: "AuditLogs", column: "TenantId", principalTable: "Tenants", principalColumn: "Id"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropForeignKey( name: "FK_AuditLogs_Tenants_TenantId", table: "AuditLogs"); migrationBuilder.DropIndex( name: "IX_AuditLogs_TenantId", table: "AuditLogs"); migrationBuilder.DropColumn( name: "TenantId", table: "AuditLogs"); migrationBuilder.AlterColumn( name: "EntityId", table: "AuditLogs", type: "bigint", nullable: false, oldClrType: typeof(string), oldType: "text"); } } }