56 lines
2.0 KiB
C#
56 lines
2.0 KiB
C#
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace NostrStreamer.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class Init : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Payments",
|
|
columns: table => new
|
|
{
|
|
PubKey = table.Column<string>(type: "text", nullable: false),
|
|
Invoice = table.Column<string>(type: "text", nullable: false),
|
|
IsPaid = table.Column<bool>(type: "boolean", nullable: false)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Payments", x => x.PubKey);
|
|
});
|
|
|
|
migrationBuilder.CreateTable(
|
|
name: "Users",
|
|
columns: table => new
|
|
{
|
|
PubKey = table.Column<string>(type: "text", nullable: false),
|
|
StreamKey = table.Column<string>(type: "text", nullable: false),
|
|
Event = table.Column<string>(type: "text", nullable: true),
|
|
Balance = table.Column<long>(type: "bigint", nullable: false),
|
|
Title = table.Column<string>(type: "text", nullable: true),
|
|
Summary = table.Column<string>(type: "text", nullable: true),
|
|
Image = table.Column<string>(type: "text", nullable: true),
|
|
Tags = table.Column<string>(type: "text", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Users", x => x.PubKey);
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Payments");
|
|
|
|
migrationBuilder.DropTable(
|
|
name: "Users");
|
|
}
|
|
}
|
|
}
|