You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.7 KiB
46 lines
1.7 KiB
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace Jellyfin.Server.Implementations.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class MediaSegments : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.CreateTable(
|
|
name: "Segments",
|
|
columns: table => new
|
|
{
|
|
Type = table.Column<int>(type: "INTEGER", nullable: false),
|
|
TypeIndex = table.Column<int>(type: "INTEGER", nullable: false),
|
|
ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
|
|
StreamIndex = table.Column<int>(type: "INTEGER", nullable: false),
|
|
StartTicks = table.Column<long>(type: "INTEGER", nullable: false),
|
|
EndTicks = table.Column<long>(type: "INTEGER", nullable: false),
|
|
Action = table.Column<int>(type: "INTEGER", nullable: false),
|
|
Comment = table.Column<string>(type: "TEXT", nullable: true)
|
|
},
|
|
constraints: table =>
|
|
{
|
|
table.PrimaryKey("PK_Segments", x => new { x.ItemId, x.StreamIndex, x.Type, x.TypeIndex });
|
|
});
|
|
|
|
migrationBuilder.CreateIndex(
|
|
name: "IX_Segments_ItemId",
|
|
table: "Segments",
|
|
column: "ItemId");
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropTable(
|
|
name: "Segments");
|
|
}
|
|
}
|
|
}
|