94 lines
3.1 KiB
C#
94 lines
3.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace PowderCoating.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddQuoteDiscountFields : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<string>(
|
|
name: "DiscountReason",
|
|
table: "Quotes",
|
|
type: "nvarchar(max)",
|
|
nullable: true);
|
|
|
|
migrationBuilder.AddColumn<int>(
|
|
name: "DiscountType",
|
|
table: "Quotes",
|
|
type: "int",
|
|
nullable: false,
|
|
defaultValue: 0);
|
|
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "DiscountValue",
|
|
table: "Quotes",
|
|
type: "decimal(18,2)",
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 5, 23, 38, 173, DateTimeKind.Utc).AddTicks(5311));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 5, 23, 38, 173, DateTimeKind.Utc).AddTicks(5344));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 5, 23, 38, 173, DateTimeKind.Utc).AddTicks(5347));
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "DiscountReason",
|
|
table: "Quotes");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DiscountType",
|
|
table: "Quotes");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "DiscountValue",
|
|
table: "Quotes");
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 1,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 3, 17, 51, 702, DateTimeKind.Utc).AddTicks(6263));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 2,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 3, 17, 51, 702, DateTimeKind.Utc).AddTicks(6268));
|
|
|
|
migrationBuilder.UpdateData(
|
|
table: "PricingTiers",
|
|
keyColumn: "Id",
|
|
keyValue: 3,
|
|
column: "CreatedAt",
|
|
value: new DateTime(2026, 2, 17, 3, 17, 51, 702, DateTimeKind.Utc).AddTicks(6270));
|
|
}
|
|
}
|
|
}
|