54 lines
1.7 KiB
C#
54 lines
1.7 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Distribution.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddRetailPriceAndAgencyMargin : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "AgencyMarginPercent",
|
|
table: "PriceListItems",
|
|
type: "decimal(65,30)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "RetailPrice",
|
|
table: "PriceListItems",
|
|
type: "decimal(65,30)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PriceListItems",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("40000000-0000-0000-0000-000000000001"),
|
|
columns: new[] { "AgencyMarginPercent", "RetailPrice" },
|
|
values: new object[] { null, null });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PriceListItems",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("40000000-0000-0000-0000-000000000002"),
|
|
columns: new[] { "AgencyMarginPercent", "RetailPrice" },
|
|
values: new object[] { null, null });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "AgencyMarginPercent",
|
|
table: "PriceListItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "RetailPrice",
|
|
table: "PriceListItems");
|
|
}
|
|
}
|
|
}
|