Add DiscountAmount column to Invoices table

This commit is contained in:
2026-10-22 10:41:20 +05:30
parent fdfca7cf5e
commit a12e170205
3 changed files with 6136 additions and 0 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,46 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Distribution.Migrations
{
/// <inheritdoc />
public partial class AddInvoiceDiscount : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<decimal>(
name: "DiscountAmount",
table: "Invoices",
type: "decimal(65,30)",
nullable: false,
defaultValue: 0m);
migrationBuilder.UpdateData(
table: "Invoices",
keyColumn: "Id",
keyValue: new Guid("34500000-0000-0000-0000-000000000001"),
column: "DiscountAmount",
value: 0m);
migrationBuilder.UpdateData(
table: "Invoices",
keyColumn: "Id",
keyValue: new Guid("34500000-0000-0000-0000-000000000002"),
column: "DiscountAmount",
value: 0m);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "DiscountAmount",
table: "Invoices");
}
}
}
@@ -848,6 +848,9 @@ namespace Distribution.Migrations
b.Property<Guid>("CreatedBy")
.HasColumnType("char(36)");
b.Property<decimal>("DiscountAmount")
.HasColumnType("decimal(65,30)");
b.Property<Guid>("FK_ShopPOId")
.HasColumnType("char(36)");
@@ -887,6 +890,7 @@ namespace Distribution.Migrations
Id = new Guid("34500000-0000-0000-0000-000000000001"),
CreatedAt = new DateTime(2026, 8, 25, 8, 30, 0, 0, DateTimeKind.Unspecified),
CreatedBy = new Guid("29000000-0000-0000-0000-000000000002"),
DiscountAmount = 0m,
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000001"),
FinalizedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
FinalizedBy = new Guid("29000000-0000-0000-0000-000000000001"),
@@ -902,6 +906,7 @@ namespace Distribution.Migrations
Id = new Guid("34500000-0000-0000-0000-000000000002"),
CreatedAt = new DateTime(2026, 8, 31, 9, 0, 0, 0, DateTimeKind.Unspecified),
CreatedBy = new Guid("29000000-0000-0000-0000-000000000003"),
DiscountAmount = 0m,
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000003"),
IsActive = true,
PaymentStatus = 1,