jellyfin/Jellyfin.Server.Implementat.../Migrations/20200613202153_AddUsers.Des...

313 lines
11 KiB
C#
Raw Normal View History

2020-06-13 11:59:19 -04:00
#pragma warning disable CS1591
// <auto-generated />
2020-05-04 16:00:41 -04:00
using System;
using Jellyfin.Server.Implementations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
namespace Jellyfin.Server.Implementations.Migrations
{
2023-01-16 12:14:44 -05:00
[DbContext(typeof(JellyfinDbContext))]
2020-06-13 16:38:17 -04:00
[Migration("20200613202153_AddUsers")]
2020-05-15 17:24:01 -04:00
partial class AddUsers
2020-05-04 16:00:41 -04:00
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasDefaultSchema("jellyfin")
2020-05-26 21:20:55 -04:00
.HasAnnotation("ProductVersion", "3.1.4");
2020-05-04 16:00:41 -04:00
2020-05-15 17:24:01 -04:00
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("DayOfWeek")
.HasColumnType("INTEGER");
b.Property<double>("EndHour")
.HasColumnType("REAL");
b.Property<double>("StartHour")
.HasColumnType("REAL");
b.Property<Guid>("UserId")
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("UserId");
2020-06-13 11:56:18 -04:00
b.ToTable("AccessSchedules");
2020-05-15 17:24:01 -04:00
});
2020-05-04 16:00:41 -04:00
modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<DateTime>("DateCreated")
.HasColumnType("TEXT");
b.Property<string>("ItemId")
.HasColumnType("TEXT")
.HasMaxLength(256);
b.Property<int>("LogSeverity")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(512);
b.Property<string>("Overview")
.HasColumnType("TEXT")
.HasMaxLength(512);
b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("ShortOverview")
.HasColumnType("TEXT")
.HasMaxLength(512);
b.Property<string>("Type")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(256);
b.Property<Guid>("UserId")
.HasColumnType("TEXT");
b.HasKey("Id");
2020-05-15 17:24:01 -04:00
b.ToTable("ActivityLogs");
2020-05-04 16:00:41 -04:00
});
2020-05-15 17:24:01 -04:00
modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
2020-05-04 16:00:41 -04:00
2020-05-15 17:24:01 -04:00
b.Property<DateTime>("LastModified")
.HasColumnType("TEXT");
b.Property<string>("Path")
.IsRequired()
2020-05-26 21:20:55 -04:00
.HasColumnType("TEXT")
.HasMaxLength(512);
2020-05-15 17:24:01 -04:00
2020-06-13 16:38:17 -04:00
b.Property<Guid?>("UserId")
.HasColumnType("TEXT");
2020-05-15 17:24:01 -04:00
b.HasKey("Id");
2020-06-13 16:38:17 -04:00
b.HasIndex("UserId")
.IsUnique();
2020-06-13 11:56:18 -04:00
b.ToTable("ImageInfos");
2020-05-04 16:00:41 -04:00
});
modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Kind")
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<Guid?>("Permission_Permissions_Guid")
.HasColumnType("TEXT");
2020-05-04 16:00:41 -04:00
b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<bool>("Value")
.HasColumnType("INTEGER");
b.HasKey("Id");
2020-05-15 17:24:01 -04:00
b.HasIndex("Permission_Permissions_Guid");
2020-05-04 16:00:41 -04:00
2020-05-15 17:24:01 -04:00
b.ToTable("Permissions");
2020-05-04 16:00:41 -04:00
});
modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<int>("Kind")
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<Guid?>("Preference_Preferences_Guid")
.HasColumnType("TEXT");
2020-05-04 16:00:41 -04:00
b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
b.Property<string>("Value")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(65535);
b.HasKey("Id");
2020-05-15 17:24:01 -04:00
b.HasIndex("Preference_Preferences_Guid");
b.ToTable("Preferences");
2020-05-04 16:00:41 -04:00
});
modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
{
2020-05-15 17:24:01 -04:00
b.Property<Guid>("Id")
2020-05-04 16:00:41 -04:00
.ValueGeneratedOnAdd()
2020-05-15 17:24:01 -04:00
.HasColumnType("TEXT");
2020-05-04 16:00:41 -04:00
b.Property<string>("AudioLanguagePreference")
.HasColumnType("TEXT")
.HasMaxLength(255);
b.Property<string>("AuthenticationProviderId")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(255);
2020-05-15 17:24:01 -04:00
b.Property<bool>("DisplayCollectionsView")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("DisplayMissingEpisodes")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<string>("EasyPassword")
.HasColumnType("TEXT")
.HasMaxLength(65535);
b.Property<bool>("EnableAutoLogin")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("EnableLocalPassword")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("EnableNextEpisodeAutoPlay")
.HasColumnType("INTEGER");
2020-05-04 16:00:41 -04:00
2020-05-15 17:24:01 -04:00
b.Property<bool>("EnableUserPreferenceAccess")
.HasColumnType("INTEGER");
b.Property<bool>("HidePlayedInLatest")
.HasColumnType("INTEGER");
b.Property<long>("InternalId")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
b.Property<int>("InvalidLoginAttemptCount")
.HasColumnType("INTEGER");
b.Property<DateTime?>("LastActivityDate")
2020-05-15 17:24:01 -04:00
.HasColumnType("TEXT");
b.Property<DateTime?>("LastLoginDate")
2020-05-15 17:24:01 -04:00
.HasColumnType("TEXT");
2020-05-04 16:00:41 -04:00
b.Property<int?>("LoginAttemptsBeforeLockout")
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<int?>("MaxParentalAgeRating")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("MustUpdatePassword")
.HasColumnType("INTEGER");
2020-05-04 16:00:41 -04:00
2020-05-15 17:24:01 -04:00
b.Property<string>("Password")
2020-05-04 16:00:41 -04:00
.HasColumnType("TEXT")
.HasMaxLength(65535);
2020-05-15 17:24:01 -04:00
b.Property<string>("PasswordResetProviderId")
.IsRequired()
2020-05-04 16:00:41 -04:00
.HasColumnType("TEXT")
2020-05-15 17:24:01 -04:00
.HasMaxLength(255);
2020-05-04 16:00:41 -04:00
b.Property<bool>("PlayDefaultAudioTrack")
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("RememberAudioSelections")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<bool>("RememberSubtitleSelections")
.HasColumnType("INTEGER");
b.Property<int?>("RemoteClientBitrateLimit")
2020-05-04 16:00:41 -04:00
.HasColumnType("INTEGER");
b.Property<uint>("RowVersion")
.IsConcurrencyToken()
.HasColumnType("INTEGER");
2020-05-15 17:24:01 -04:00
b.Property<string>("SubtitleLanguagePreference")
2020-05-04 16:00:41 -04:00
.HasColumnType("TEXT")
.HasMaxLength(255);
2020-05-15 17:24:01 -04:00
b.Property<int>("SubtitleMode")
.HasColumnType("INTEGER");
2020-05-04 16:00:41 -04:00
2020-05-26 21:20:55 -04:00
b.Property<int>("SyncPlayAccess")
.HasColumnType("INTEGER");
2020-05-04 16:00:41 -04:00
b.Property<string>("Username")
.IsRequired()
.HasColumnType("TEXT")
.HasMaxLength(255);
b.HasKey("Id");
2020-05-15 17:24:01 -04:00
b.ToTable("Users");
});
modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
.WithMany("AccessSchedules")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
2020-05-04 16:00:41 -04:00
});
2020-06-13 16:38:17 -04:00
modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
.WithOne("ProfileImage")
.HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId");
});
2020-05-04 16:00:41 -04:00
modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
{
b.HasOne("Jellyfin.Data.Entities.User", null)
.WithMany("Permissions")
2020-05-15 17:24:01 -04:00
.HasForeignKey("Permission_Permissions_Guid");
2020-05-04 16:00:41 -04:00
});
modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
{
2020-05-15 17:24:01 -04:00
b.HasOne("Jellyfin.Data.Entities.User", null)
2020-05-04 16:00:41 -04:00
.WithMany("Preferences")
2020-05-15 17:24:01 -04:00
.HasForeignKey("Preference_Preferences_Guid");
2020-05-04 16:00:41 -04:00
});
#pragma warning restore 612, 618
}
}
}