67 lines
2.0 KiB
C#
67 lines
2.0 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Distribution.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddGrnNbt : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "NbtPercent",
|
|
table: "GoodsReceipts",
|
|
type: "decimal(5,2)",
|
|
precision: 5,
|
|
scale: 2,
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "NbtPercent",
|
|
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"),
|
|
column: "NbtPercent",
|
|
value: 0m);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "GoodsReceiptItems",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("44000000-0000-0000-0000-000000000002"),
|
|
column: "NbtPercent",
|
|
value: 0m);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "GoodsReceipts",
|
|
keyColumn: "Id",
|
|
keyValue: new Guid("43000000-0000-0000-0000-000000000001"),
|
|
column: "NbtPercent",
|
|
value: 0m);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "NbtPercent",
|
|
table: "GoodsReceipts");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "NbtPercent",
|
|
table: "GoodsReceiptItems");
|
|
}
|
|
}
|
|
}
|