55 lines
1.7 KiB
C#
55 lines
1.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Distribution.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddRideCancelReason : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "CancelReason",
|
|
table: "DeliveryRuns",
|
|
type: "longtext",
|
|
nullable: true)
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "CancelTypeCode",
|
|
table: "DeliveryRuns",
|
|
type: "int",
|
|
nullable: true);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "DeliveryRuns",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("31000000-0000-0000-0000-000000000001"),
|
|
columns: new[] { "CancelReason", "CancelTypeCode" },
|
|
values: new object[] { null, null });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "DeliveryRuns",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("31000000-0000-0000-0000-000000000002"),
|
|
columns: new[] { "CancelReason", "CancelTypeCode" },
|
|
values: new object[] { null, null });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "CancelReason",
|
|
table: "DeliveryRuns");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "CancelTypeCode",
|
|
table: "DeliveryRuns");
|
|
}
|
|
}
|
|
}
|