[DB] Update migrations for datetime update

This commit is contained in:
max
2025-09-02 16:17:47 +02:00
parent d98a99d145
commit a8b0291ebf
7 changed files with 58 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ public sealed class LibraryDbContext : DbContext
{
ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking;
ChangeTracker.LazyLoadingEnabled = false;
Database.EnsureCreated();
}
public DbSet<CaptionEntity> Captions { get; set; }

View File

@@ -11,7 +11,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Manager.Data.Migrations
{
[DbContext(typeof(LibraryDbContext))]
[Migration("20250902133345_InitialLibrary")]
[Migration("20250902141251_InitialLibrary")]
partial class InitialLibrary
{
/// <inheritdoc />
@@ -30,6 +30,12 @@ namespace Manager.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
@@ -157,10 +163,10 @@ namespace Manager.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("DateAddedUtc")
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<DateTime>("DateModifiedUtc")
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.HasKey("PlaylistId", "MediaId");
@@ -242,6 +248,9 @@ namespace Manager.Data.Migrations
b.Property<long>("ContentLengthBytes")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<double?>("Framerate")
.HasColumnType("REAL");
@@ -254,6 +263,9 @@ namespace Manager.Data.Migrations
b.Property<long>("LastModifiedUnixEpoch")
.HasColumnType("INTEGER");
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property<double?>("LoudnessDb")
.HasColumnType("REAL");

View File

@@ -131,7 +131,9 @@ namespace Manager.Data.Migrations
{
MediaId = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
LanguageCode = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false)
Name = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
CreatedAtUtc = table.Column<DateTime>(type: "TEXT", nullable: false),
LastModifiedUtc = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@@ -164,7 +166,9 @@ namespace Manager.Data.Migrations
QualityLabel = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
AudioChannels = table.Column<int>(type: "INTEGER", nullable: true),
AudioSampleRate = table.Column<string>(type: "TEXT", maxLength: 100, nullable: true),
LoudnessDb = table.Column<double>(type: "REAL", nullable: true)
LoudnessDb = table.Column<double>(type: "REAL", nullable: true),
CreatedAtUtc = table.Column<DateTime>(type: "TEXT", nullable: false),
LastModifiedUtc = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{
@@ -183,8 +187,8 @@ namespace Manager.Data.Migrations
{
PlaylistId = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
MediaId = table.Column<string>(type: "TEXT", maxLength: 100, nullable: false),
DateAddedUtc = table.Column<DateTime>(type: "TEXT", nullable: false),
DateModifiedUtc = table.Column<DateTime>(type: "TEXT", nullable: false)
CreatedAtUtc = table.Column<DateTime>(type: "TEXT", nullable: false),
LastModifiedUtc = table.Column<DateTime>(type: "TEXT", nullable: false)
},
constraints: table =>
{

View File

@@ -27,6 +27,12 @@ namespace Manager.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(100)
@@ -154,10 +160,10 @@ namespace Manager.Data.Migrations
.HasMaxLength(100)
.HasColumnType("TEXT");
b.Property<DateTime>("DateAddedUtc")
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<DateTime>("DateModifiedUtc")
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.HasKey("PlaylistId", "MediaId");
@@ -239,6 +245,9 @@ namespace Manager.Data.Migrations
b.Property<long>("ContentLengthBytes")
.HasColumnType("INTEGER");
b.Property<DateTime>("CreatedAtUtc")
.HasColumnType("TEXT");
b.Property<double?>("Framerate")
.HasColumnType("REAL");
@@ -251,6 +260,9 @@ namespace Manager.Data.Migrations
b.Property<long>("LastModifiedUnixEpoch")
.HasColumnType("INTEGER");
b.Property<DateTime>("LastModifiedUtc")
.HasColumnType("TEXT");
b.Property<double?>("LoudnessDb")
.HasColumnType("REAL");