Api/Netina.Repository/Migrations/20240209214154_EditOrderPro...

45 lines
1.3 KiB
C#

using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NetinaShop.Repository.Migrations
{
/// <inheritdoc />
public partial class EditOrderProductAddDiscount : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "HasDiscount",
schema: "public",
table: "OrderProducts",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<double>(
name: "ProductFeeWithDiscount",
schema: "public",
table: "OrderProducts",
type: "double precision",
nullable: false,
defaultValue: 0.0);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "HasDiscount",
schema: "public",
table: "OrderProducts");
migrationBuilder.DropColumn(
name: "ProductFeeWithDiscount",
schema: "public",
table: "OrderProducts");
}
}
}