using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NostrStreamer.Migrations
{
///
public partial class Forwards : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Forwards",
columns: table => new
{
Id = table.Column(type: "uuid", nullable: false),
UserPubkey = table.Column(type: "text", nullable: false),
Name = table.Column(type: "text", nullable: false),
Target = table.Column(type: "text", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Forwards", x => x.Id);
table.ForeignKey(
name: "FK_Forwards_Users_UserPubkey",
column: x => x.UserPubkey,
principalTable: "Users",
principalColumn: "PubKey",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Forwards_UserPubkey",
table: "Forwards",
column: "UserPubkey");
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Forwards");
}
}
}