using System; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace NostrStreamer.Migrations { /// public partial class DVR : Migration { /// protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.CreateTable( name: "Recordings", columns: table => new { Id = table.Column(type: "uuid", nullable: false), UserStreamId = table.Column(type: "uuid", nullable: false), Url = table.Column(type: "text", nullable: false), Timestamp = table.Column(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"); } /// protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "Recordings"); } } }