diff options
| author | Patrick Barron <barronpm@gmail.com> | 2021-06-18 17:07:22 -0400 |
|---|---|---|
| committer | Patrick Barron <barronpm@gmail.com> | 2021-06-18 17:07:22 -0400 |
| commit | 3fd0b1a359241b8d5d4884424b72b5c1dc1caed0 (patch) | |
| tree | 918f61bbb7d9f6b2f0ae7858f360bc2aec67b8bd | |
| parent | 3d9c16ba6b8be965da8ed57510f8f90831ed1e22 (diff) | |
Recreate devices migration with missing fields
| -rw-r--r-- | Jellyfin.Data/Entities/Security/ApiKey.cs | 9 | ||||
| -rw-r--r-- | Jellyfin.Data/Entities/Security/Device.cs | 4 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.Designer.cs (renamed from Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.Designer.cs) | 8 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.cs (renamed from Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.cs) | 2 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs | 5 |
5 files changed, 21 insertions, 7 deletions
diff --git a/Jellyfin.Data/Entities/Security/ApiKey.cs b/Jellyfin.Data/Entities/Security/ApiKey.cs index 2a3ad09c4..5c9ac5d5b 100644 --- a/Jellyfin.Data/Entities/Security/ApiKey.cs +++ b/Jellyfin.Data/Entities/Security/ApiKey.cs @@ -31,9 +31,14 @@ namespace Jellyfin.Data.Entities.Security public int Id { get; private set; } /// <summary> - /// Gets the date created. + /// Gets or sets the date created. /// </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> /// Gets or sets the name. diff --git a/Jellyfin.Data/Entities/Security/Device.cs b/Jellyfin.Data/Entities/Security/Device.cs index bb05cf5a4..3d0269229 100644 --- a/Jellyfin.Data/Entities/Security/Device.cs +++ b/Jellyfin.Data/Entities/Security/Device.cs @@ -84,9 +84,9 @@ namespace Jellyfin.Data.Entities.Security public bool IsActive { get; set; } /// <summary> - /// Gets the date this device was created. + /// Gets or sets the date this device was created. /// </summary> - public DateTime DateCreated { get; private set; } + public DateTime DateCreated { get; set; } /// <summary> /// Gets or sets the date of last activity. diff --git a/Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.Designer.cs b/Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.Designer.cs index e1faef7a2..933e82229 100644 --- a/Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.Designer.cs +++ b/Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.Designer.cs @@ -1,4 +1,5 @@ #pragma warning disable CS1591 + // <auto-generated /> using System; using Jellyfin.Server.Implementations; @@ -10,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace Jellyfin.Server.Implementations.Migrations { [DbContext(typeof(JellyfinDb))] - [Migration("20210521032224_AddDevices")] + [Migration("20210602224232_AddDevices")] partial class AddDevices { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -18,7 +19,7 @@ namespace Jellyfin.Server.Implementations.Migrations #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("jellyfin") - .HasAnnotation("ProductVersion", "5.0.5"); + .HasAnnotation("ProductVersion", "5.0.6"); modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => { @@ -347,6 +348,9 @@ namespace Jellyfin.Server.Implementations.Migrations b.Property<DateTime>("DateCreated") .HasColumnType("TEXT"); + b.Property<DateTime>("DateLastActivity") + .HasColumnType("TEXT"); + b.Property<string>("Name") .IsRequired() .HasMaxLength(64) diff --git a/Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.cs b/Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.cs index 2da8d3788..110ca1cc3 100644 --- a/Jellyfin.Server.Implementations/Migrations/20210521032224_AddDevices.cs +++ b/Jellyfin.Server.Implementations/Migrations/20210602224232_AddDevices.cs @@ -1,5 +1,6 @@ #pragma warning disable CS1591 #pragma warning disable SA1601 + using System; using Microsoft.EntityFrameworkCore.Migrations; @@ -17,6 +18,7 @@ namespace Jellyfin.Server.Implementations.Migrations Id = table.Column<int>(type: "INTEGER", nullable: false) .Annotation("Sqlite:Autoincrement", true), 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), AccessToken = table.Column<Guid>(type: "TEXT", nullable: false) }, diff --git a/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs b/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs index 8a1ae16f8..b508b834c 100644 --- a/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs +++ b/Jellyfin.Server.Implementations/Migrations/JellyfinDbModelSnapshot.cs @@ -15,7 +15,7 @@ namespace Jellyfin.Server.Implementations.Migrations #pragma warning disable 612, 618 modelBuilder .HasDefaultSchema("jellyfin") - .HasAnnotation("ProductVersion", "5.0.5"); + .HasAnnotation("ProductVersion", "5.0.6"); modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b => { @@ -344,6 +344,9 @@ namespace Jellyfin.Server.Implementations.Migrations b.Property<DateTime>("DateCreated") .HasColumnType("TEXT"); + b.Property<DateTime>("DateLastActivity") + .HasColumnType("TEXT"); + b.Property<string>("Name") .IsRequired() .HasMaxLength(64) |
