Recreate devices migration with missing fields

This commit is contained in:
Patrick Barron 2021-06-18 17:07:22 -04:00
parent 3d9c16ba6b
commit 3fd0b1a359
5 changed files with 21 additions and 7 deletions

View File

@ -31,9 +31,14 @@ namespace Jellyfin.Data.Entities.Security
public int Id { get; private set; } public int Id { get; private set; }
/// <summary> /// <summary>
/// Gets the date created. /// Gets or sets the date created.
/// </summary> /// </summary>
public DateTime DateCreated { get; private set; } public DateTime DateCreated { get; set; }
/// <summary>
/// Gets or sets the date of last activity.
/// </summary>
public DateTime DateLastActivity { get; set; }
/// <summary> /// <summary>
/// Gets or sets the name. /// Gets or sets the name.

View File

@ -84,9 +84,9 @@ namespace Jellyfin.Data.Entities.Security
public bool IsActive { get; set; } public bool IsActive { get; set; }
/// <summary> /// <summary>
/// Gets the date this device was created. /// Gets or sets the date this device was created.
/// </summary> /// </summary>
public DateTime DateCreated { get; private set; } public DateTime DateCreated { get; set; }
/// <summary> /// <summary>
/// Gets or sets the date of last activity. /// Gets or sets the date of last activity.

View File

@ -1,4 +1,5 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
// <auto-generated /> // <auto-generated />
using System; using System;
using Jellyfin.Server.Implementations; using Jellyfin.Server.Implementations;
@ -10,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Jellyfin.Server.Implementations.Migrations namespace Jellyfin.Server.Implementations.Migrations
{ {
[DbContext(typeof(JellyfinDb))] [DbContext(typeof(JellyfinDb))]
[Migration("20210521032224_AddDevices")] [Migration("20210602224232_AddDevices")]
partial class AddDevices partial class AddDevices
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
@ -18,7 +19,7 @@ namespace Jellyfin.Server.Implementations.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasDefaultSchema("jellyfin") .HasDefaultSchema("jellyfin")
.HasAnnotation("ProductVersion", "5.0.5"); .HasAnnotation("ProductVersion", "5.0.6");
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
{ {
@ -347,6 +348,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<DateTime>("DateCreated") b.Property<DateTime>("DateCreated")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<DateTime>("DateLastActivity")
.HasColumnType("TEXT");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasMaxLength(64) .HasMaxLength(64)

View File

@ -1,5 +1,6 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
#pragma warning disable SA1601 #pragma warning disable SA1601
using System; using System;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
@ -17,6 +18,7 @@ namespace Jellyfin.Server.Implementations.Migrations
Id = table.Column<int>(type: "INTEGER", nullable: false) Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true), .Annotation("Sqlite:Autoincrement", true),
DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false), DateCreated = table.Column<DateTime>(type: "TEXT", nullable: false),
DateLastActivity = table.Column<DateTime>(type: "TEXT", nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false), Name = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
AccessToken = table.Column<Guid>(type: "TEXT", nullable: false) AccessToken = table.Column<Guid>(type: "TEXT", nullable: false)
}, },

View File

@ -15,7 +15,7 @@ namespace Jellyfin.Server.Implementations.Migrations
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasDefaultSchema("jellyfin") .HasDefaultSchema("jellyfin")
.HasAnnotation("ProductVersion", "5.0.5"); .HasAnnotation("ProductVersion", "5.0.6");
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
{ {
@ -344,6 +344,9 @@ namespace Jellyfin.Server.Implementations.Migrations
b.Property<DateTime>("DateCreated") b.Property<DateTime>("DateCreated")
.HasColumnType("TEXT"); .HasColumnType("TEXT");
b.Property<DateTime>("DateLastActivity")
.HasColumnType("TEXT");
b.Property<string>("Name") b.Property<string>("Name")
.IsRequired() .IsRequired()
.HasMaxLength(64) .HasMaxLength(64)