20240729140605_AddMediaSegments.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. using Microsoft.EntityFrameworkCore.Migrations;
  3. #nullable disable
  4. namespace Jellyfin.Server.Implementations.Migrations
  5. {
  6. /// <inheritdoc />
  7. public partial class AddMediaSegments : Migration
  8. {
  9. /// <inheritdoc />
  10. protected override void Up(MigrationBuilder migrationBuilder)
  11. {
  12. migrationBuilder.CreateTable(
  13. name: "MediaSegments",
  14. columns: table => new
  15. {
  16. Id = table.Column<Guid>(type: "TEXT", nullable: false),
  17. ItemId = table.Column<Guid>(type: "TEXT", nullable: false),
  18. Type = table.Column<int>(type: "INTEGER", nullable: false),
  19. EndTicks = table.Column<long>(type: "INTEGER", nullable: false),
  20. StartTicks = table.Column<long>(type: "INTEGER", nullable: false),
  21. SegmentProviderId = table.Column<string>(type: "TEXT", nullable: false),
  22. },
  23. constraints: table =>
  24. {
  25. table.PrimaryKey("PK_MediaSegments", x => x.Id);
  26. });
  27. }
  28. /// <inheritdoc />
  29. protected override void Down(MigrationBuilder migrationBuilder)
  30. {
  31. migrationBuilder.DropTable(
  32. name: "MediaSegments");
  33. }
  34. }
  35. }