Add DiscountAmount column to Invoices table
This commit is contained in:
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")
|
b.Property<Guid>("CreatedBy")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
|
b.Property<decimal>("DiscountAmount")
|
||||||
|
.HasColumnType("decimal(65,30)");
|
||||||
|
|
||||||
b.Property<Guid>("FK_ShopPOId")
|
b.Property<Guid>("FK_ShopPOId")
|
||||||
.HasColumnType("char(36)");
|
.HasColumnType("char(36)");
|
||||||
|
|
||||||
@@ -887,6 +890,7 @@ namespace Distribution.Migrations
|
|||||||
Id = new Guid("34500000-0000-0000-0000-000000000001"),
|
Id = new Guid("34500000-0000-0000-0000-000000000001"),
|
||||||
CreatedAt = new DateTime(2026, 8, 25, 8, 30, 0, 0, DateTimeKind.Unspecified),
|
CreatedAt = new DateTime(2026, 8, 25, 8, 30, 0, 0, DateTimeKind.Unspecified),
|
||||||
CreatedBy = new Guid("29000000-0000-0000-0000-000000000002"),
|
CreatedBy = new Guid("29000000-0000-0000-0000-000000000002"),
|
||||||
|
DiscountAmount = 0m,
|
||||||
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000001"),
|
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000001"),
|
||||||
FinalizedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
FinalizedAt = new DateTime(2026, 8, 25, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
FinalizedBy = new Guid("29000000-0000-0000-0000-000000000001"),
|
FinalizedBy = new Guid("29000000-0000-0000-0000-000000000001"),
|
||||||
@@ -902,6 +906,7 @@ namespace Distribution.Migrations
|
|||||||
Id = new Guid("34500000-0000-0000-0000-000000000002"),
|
Id = new Guid("34500000-0000-0000-0000-000000000002"),
|
||||||
CreatedAt = new DateTime(2026, 8, 31, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
CreatedAt = new DateTime(2026, 8, 31, 9, 0, 0, 0, DateTimeKind.Unspecified),
|
||||||
CreatedBy = new Guid("29000000-0000-0000-0000-000000000003"),
|
CreatedBy = new Guid("29000000-0000-0000-0000-000000000003"),
|
||||||
|
DiscountAmount = 0m,
|
||||||
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000003"),
|
FK_ShopPOId = new Guid("33000000-0000-0000-0000-000000000003"),
|
||||||
IsActive = true,
|
IsActive = true,
|
||||||
PaymentStatus = 1,
|
PaymentStatus = 1,
|
||||||
|
|||||||
Reference in New Issue
Block a user