using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Marco.Pms.DataAccess.Migrations { /// public partial class Added_IsExpenseCreated_In_Payment_Request_Table : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterColumn( name: "LatestPRGeneratedAt", table: "RecurringPayments", type: "datetime(6)", nullable: true, oldClrType: typeof(DateTime), oldType: "datetime(6)"); migrationBuilder.AddColumn( name: "IsExpenseCreated", table: "PaymentRequests", type: "tinyint(1)", nullable: false, defaultValue: false); migrationBuilder.AlterColumn( name: "ExpenseUId", table: "Expenses", type: "longtext", nullable: true, oldClrType: typeof(string), oldType: "longtext") .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "IsExpenseCreated", table: "PaymentRequests"); migrationBuilder.AlterColumn( name: "LatestPRGeneratedAt", table: "RecurringPayments", type: "datetime(6)", nullable: false, defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified), oldClrType: typeof(DateTime), oldType: "datetime(6)", oldNullable: true); migrationBuilder.UpdateData( table: "Expenses", keyColumn: "ExpenseUId", keyValue: null, column: "ExpenseUId", value: ""); migrationBuilder.AlterColumn( name: "ExpenseUId", table: "Expenses", type: "longtext", nullable: false, oldClrType: typeof(string), oldType: "longtext", oldNullable: true) .Annotation("MySql:CharSet", "utf8mb4") .OldAnnotation("MySql:CharSet", "utf8mb4"); } } }