using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Distribution.Migrations { /// public partial class AddShopPOCancelInfo : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "CancelReason", table: "ShopPOs", type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.AddColumn( name: "CancelledAt", table: "ShopPOs", type: "datetime(6)", nullable: true); migrationBuilder.AddColumn( name: "CancelledBy", table: "ShopPOs", type: "char(36)", nullable: true, collation: "ascii_general_ci"); migrationBuilder.UpdateData( table: "ShopPOs", keyColumn: "Id", keyValue: new Guid("33000000-0000-0000-0000-000000000001"), columns: new[] { "CancelReason", "CancelledAt", "CancelledBy" }, values: new object[] { null, null, null }); migrationBuilder.UpdateData( table: "ShopPOs", keyColumn: "Id", keyValue: new Guid("33000000-0000-0000-0000-000000000002"), columns: new[] { "CancelReason", "CancelledAt", "CancelledBy" }, values: new object[] { null, null, null }); migrationBuilder.UpdateData( table: "ShopPOs", keyColumn: "Id", keyValue: new Guid("33000000-0000-0000-0000-000000000003"), columns: new[] { "CancelReason", "CancelledAt", "CancelledBy" }, values: new object[] { null, null, null }); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "CancelReason", table: "ShopPOs"); migrationBuilder.DropColumn( name: "CancelledAt", table: "ShopPOs"); migrationBuilder.DropColumn( name: "CancelledBy", table: "ShopPOs"); } } }