106 lines
3.4 KiB
C#
106 lines
3.4 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Distribution.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddGrnPricing : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "DiscountPercent",
|
|
table: "GoodsReceipts",
|
|
type: "decimal(5,2)",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "VatPercent",
|
|
table: "GoodsReceipts",
|
|
type: "decimal(5,2)",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "DiscountPercent",
|
|
table: "GoodsReceiptItems",
|
|
type: "decimal(5,2)",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "UnitCost",
|
|
table: "GoodsReceiptItems",
|
|
type: "decimal(18,2)",
|
|
precision: 18,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "VatPercent",
|
|
table: "GoodsReceiptItems",
|
|
type: "decimal(5,2)",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "GoodsReceiptItems",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("44000000-0000-0000-0000-000000000001"),
|
|
columns: new[] { "DiscountPercent", "UnitCost", "VatPercent" },
|
|
values: new object[] { 0m, 0m, 0m });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "GoodsReceiptItems",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("44000000-0000-0000-0000-000000000002"),
|
|
columns: new[] { "DiscountPercent", "UnitCost", "VatPercent" },
|
|
values: new object[] { 0m, 0m, 0m });
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "GoodsReceipts",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("43000000-0000-0000-0000-000000000001"),
|
|
columns: new[] { "DiscountPercent", "VatPercent" },
|
|
values: new object[] { 0m, 0m });
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "DiscountPercent",
|
|
table: "GoodsReceipts");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "VatPercent",
|
|
table: "GoodsReceipts");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DiscountPercent",
|
|
table: "GoodsReceiptItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "UnitCost",
|
|
table: "GoodsReceiptItems");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "VatPercent",
|
|
table: "GoodsReceiptItems");
|
|
}
|
|
}
|
|
}
|