32 lines
861 B
C#
32 lines
861 B
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NostrStreamer.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class PaymentFee : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<decimal>(
|
|
name: "Fee",
|
|
table: "Payments",
|
|
type: "numeric(20,0)",
|
|
nullable: false,
|
|
defaultValue: 0m);
|
|
|
|
migrationBuilder.Sql("update \"Payments\" set \"Amount\" = \"Amount\" * 1000");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "Fee",
|
|
table: "Payments");
|
|
}
|
|
}
|
|
}
|