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