73 lines
2.4 KiB
C#
73 lines
2.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Distribution.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddShopPOCancelInfo : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CancelReason",
|
|
table: "ShopPOs",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "CancelledAt",
|
|
table: "ShopPOs",
|
|
type: "datetime(6)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<Guid>(
|
|
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 });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CancelReason",
|
|
table: "ShopPOs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CancelledAt",
|
|
table: "ShopPOs");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CancelledBy",
|
|
table: "ShopPOs");
|
|
}
|
|
}
|
|
}
|