This commit is contained in:
2023-07-29 17:43:19 +01:00
parent 4f690b114d
commit c5c9c54518
24 changed files with 985 additions and 12 deletions

View File

@ -0,0 +1,47 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace NostrStreamer.Migrations
{
/// <inheritdoc />
public partial class DVR : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Recordings",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
UserStreamId = table.Column<Guid>(type: "uuid", nullable: false),
Url = table.Column<string>(type: "text", nullable: false),
Timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Recordings", x => x.Id);
table.ForeignKey(
name: "FK_Recordings_Streams_UserStreamId",
column: x => x.UserStreamId,
principalTable: "Streams",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_Recordings_UserStreamId",
table: "Recordings",
column: "UserStreamId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Recordings");
}
}
}