Add NbtPercent column to GoodsReceipts and GoodsReceiptItems

This commit is contained in:
2026-10-08 12:44:28 +05:30
parent 702efba62e
commit b12f3c8d08
5 changed files with 4547 additions and 0 deletions
@@ -0,0 +1,66 @@
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");
}
}
}