Updated Migrations
Couple of migrations to get the Json Value to work properly.
This commit is contained in:
parent
904db16461
commit
50ad10682b
4 changed files with 536 additions and 0 deletions
246
FreeTubeSync/Migrations/20250724061008_ChangeSettingToJsonElement.Designer.cs
generated
Normal file
246
FreeTubeSync/Migrations/20250724061008_ChangeSettingToJsonElement.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
// <auto-generated />
|
||||
using System.Text.Json;
|
||||
using FreeTubeSync.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FreeTubeSync.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250724061008_ChangeSettingToJsonElement")]
|
||||
partial class ChangeSettingToJsonElement
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.7");
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.History", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("author")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("authorId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("description")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("isLive")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("lastViewedPlaylistItemId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("lastViewedPlaylistType")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("lengthSeconds")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("published")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("timeWatched")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("type")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("videoId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("viewCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<float>("watchProgress")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Histories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("createdAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("lastUpdatedAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("playlistName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("protected")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Playlists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("bgColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("textColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Profiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.SearchHistory", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("lastUpdatedAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("SearchHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Setting", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<JsonElement>("value")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
|
||||
{
|
||||
b.Property<string>("id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Profile_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("thumbnail")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("Profile_id");
|
||||
|
||||
b.ToTable("Subscriptions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
|
||||
{
|
||||
b.Property<string>("playlistItemId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Playlist_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("author")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("authorId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("lengthSeconds")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("pubished")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("timeAdded")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("type")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("videoId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("playlistItemId");
|
||||
|
||||
b.HasIndex("Playlist_id");
|
||||
|
||||
b.ToTable("Videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
|
||||
{
|
||||
b.HasOne("FreeTubeSync.Model.Database.Profile", null)
|
||||
.WithMany("subscriptions")
|
||||
.HasForeignKey("Profile_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
|
||||
{
|
||||
b.HasOne("FreeTubeSync.Model.Database.Playlist", null)
|
||||
.WithMany("videos")
|
||||
.HasForeignKey("Playlist_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
|
||||
{
|
||||
b.Navigation("videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
|
||||
{
|
||||
b.Navigation("subscriptions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FreeTubeSync.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ChangeSettingToJsonElement : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
246
FreeTubeSync/Migrations/20250724074916_FinalizeSettingStringValue.Designer.cs
generated
Normal file
246
FreeTubeSync/Migrations/20250724074916_FinalizeSettingStringValue.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,246 @@
|
|||
// <auto-generated />
|
||||
using FreeTubeSync.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FreeTubeSync.Migrations
|
||||
{
|
||||
[DbContext(typeof(DataContext))]
|
||||
[Migration("20250724074916_FinalizeSettingStringValue")]
|
||||
partial class FinalizeSettingStringValue
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder.HasAnnotation("ProductVersion", "9.0.7");
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.History", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("author")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("authorId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("description")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("isLive")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("lastViewedPlaylistItemId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("lastViewedPlaylistType")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("lengthSeconds")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("published")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("timeWatched")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("type")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("videoId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("viewCount")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<float>("watchProgress")
|
||||
.HasColumnType("REAL");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Histories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("createdAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("lastUpdatedAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("playlistName")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<bool>("protected")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Playlists");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("bgColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("textColor")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Profiles");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.SearchHistory", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("lastUpdatedAt")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("SearchHistories");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Setting", b =>
|
||||
{
|
||||
b.Property<string>("_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("value")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("_id");
|
||||
|
||||
b.ToTable("Settings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
|
||||
{
|
||||
b.Property<string>("id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Profile_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("thumbnail")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("id");
|
||||
|
||||
b.HasIndex("Profile_id");
|
||||
|
||||
b.ToTable("Subscriptions");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
|
||||
{
|
||||
b.Property<string>("playlistItemId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("Playlist_id")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("author")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("authorId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("lengthSeconds")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<long>("pubished")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<long>("timeAdded")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("title")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("type")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("videoId")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("playlistItemId");
|
||||
|
||||
b.HasIndex("Playlist_id");
|
||||
|
||||
b.ToTable("Videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Subscription", b =>
|
||||
{
|
||||
b.HasOne("FreeTubeSync.Model.Database.Profile", null)
|
||||
.WithMany("subscriptions")
|
||||
.HasForeignKey("Profile_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Video", b =>
|
||||
{
|
||||
b.HasOne("FreeTubeSync.Model.Database.Playlist", null)
|
||||
.WithMany("videos")
|
||||
.HasForeignKey("Playlist_id");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Playlist", b =>
|
||||
{
|
||||
b.Navigation("videos");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FreeTubeSync.Model.Database.Profile", b =>
|
||||
{
|
||||
b.Navigation("subscriptions");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FreeTubeSync.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class FinalizeSettingStringValue : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue