using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace Distribution.Migrations { /// public partial class AddGrnNbt : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AddColumn( name: "NbtPercent", table: "GoodsReceipts", type: "decimal(5,2)", precision: 5, scale: 2, nullable: false, defaultValue: 0m); migrationBuilder.AddColumn( 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); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropColumn( name: "NbtPercent", table: "GoodsReceipts"); migrationBuilder.DropColumn( name: "NbtPercent", table: "GoodsReceiptItems"); } } }