< Summary - Jellyfin

Information
Class: Jellyfin.Server.Implementations.Migrations.JellyfinDbModelSnapshot
Assembly: Jellyfin.Database.Providers.Sqlite
File(s): /srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs
Line coverage
100%
Covered lines: 1730
Uncovered lines: 0
Coverable lines: 1730
Total lines: 1808
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/1/2026 - 12:13:05 AM Line coverage: 100% (1642/1642) Total lines: 17185/4/2026 - 12:15:16 AM Line coverage: 100% (1712/1712) Total lines: 17905/5/2026 - 12:15:44 AM Line coverage: 100% (1715/1715) Total lines: 17935/8/2026 - 12:15:13 AM Line coverage: 100% (1721/1721) Total lines: 17995/27/2026 - 12:15:38 AM Line coverage: 100% (1729/1729) Total lines: 18077/27/2026 - 12:16:14 AM Line coverage: 100% (1732/1732) Total lines: 18108/2/2026 - 12:17:28 AM Line coverage: 100% (1730/1730) Total lines: 1808

Coverage delta

Coverage delta 1 -1

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildModel(...)100%11100%

File(s)

/srv/git/jellyfin/src/Jellyfin.Database/Jellyfin.Database.Providers.Sqlite/Migrations/JellyfinDbModelSnapshot.cs

#LineLine coverage
 1// <auto-generated />
 2using System;
 3using Jellyfin.Database.Implementations;
 4using Microsoft.EntityFrameworkCore;
 5using Microsoft.EntityFrameworkCore.Infrastructure;
 6using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
 7
 8#nullable disable
 9
 10namespace Jellyfin.Server.Implementations.Migrations
 11{
 12    [DbContext(typeof(JellyfinDbContext))]
 13    partial class JellyfinDbModelSnapshot : ModelSnapshot
 14    {
 15        protected override void BuildModel(ModelBuilder modelBuilder)
 16        {
 17#pragma warning disable 612, 618
 118            modelBuilder.HasAnnotation("ProductVersion", "10.0.10");
 19
 120            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 121                {
 122                    b.Property<int>("Id")
 123                        .ValueGeneratedOnAdd()
 124                        .HasColumnType("INTEGER");
 125
 126                    b.Property<int>("DayOfWeek")
 127                        .HasColumnType("INTEGER");
 128
 129                    b.Property<double>("EndHour")
 130                        .HasColumnType("REAL");
 131
 132                    b.Property<double>("StartHour")
 133                        .HasColumnType("REAL");
 134
 135                    b.Property<Guid>("UserId")
 136                        .HasColumnType("TEXT");
 137
 138                    b.HasKey("Id");
 139
 140                    b.HasIndex("UserId");
 141
 142                    b.ToTable("AccessSchedules");
 143
 144                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 145                });
 46
 147            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ActivityLog", b =>
 148                {
 149                    b.Property<int>("Id")
 150                        .ValueGeneratedOnAdd()
 151                        .HasColumnType("INTEGER");
 152
 153                    b.Property<DateTime>("DateCreated")
 154                        .HasColumnType("TEXT");
 155
 156                    b.Property<string>("ItemId")
 157                        .HasMaxLength(256)
 158                        .HasColumnType("TEXT");
 159
 160                    b.Property<int>("LogSeverity")
 161                        .HasColumnType("INTEGER");
 162
 163                    b.Property<string>("Name")
 164                        .IsRequired()
 165                        .HasMaxLength(512)
 166                        .HasColumnType("TEXT");
 167
 168                    b.Property<string>("Overview")
 169                        .HasMaxLength(512)
 170                        .HasColumnType("TEXT");
 171
 172                    b.Property<uint>("RowVersion")
 173                        .IsConcurrencyToken()
 174                        .HasColumnType("INTEGER");
 175
 176                    b.Property<string>("ShortOverview")
 177                        .HasMaxLength(512)
 178                        .HasColumnType("TEXT");
 179
 180                    b.Property<string>("Type")
 181                        .IsRequired()
 182                        .HasMaxLength(256)
 183                        .HasColumnType("TEXT");
 184
 185                    b.Property<Guid>("UserId")
 186                        .HasColumnType("TEXT");
 187
 188                    b.HasKey("Id");
 189
 190                    b.HasIndex("DateCreated");
 191
 192                    b.ToTable("ActivityLogs");
 193
 194                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 195                });
 96
 197            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 198                {
 199                    b.Property<Guid>("ItemId")
 1100                        .HasColumnType("TEXT");
 1101
 1102                    b.Property<Guid>("ParentItemId")
 1103                        .HasColumnType("TEXT");
 1104
 1105                    b.HasKey("ItemId", "ParentItemId");
 1106
 1107                    b.HasIndex("ParentItemId");
 1108
 1109                    b.ToTable("AncestorIds");
 1110
 1111                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1112                });
 113
 1114            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 1115                {
 1116                    b.Property<Guid>("ItemId")
 1117                        .HasColumnType("TEXT");
 1118
 1119                    b.Property<int>("Index")
 1120                        .HasColumnType("INTEGER");
 1121
 1122                    b.Property<string>("Codec")
 1123                        .HasColumnType("TEXT");
 1124
 1125                    b.Property<string>("CodecTag")
 1126                        .HasColumnType("TEXT");
 1127
 1128                    b.Property<string>("Comment")
 1129                        .HasColumnType("TEXT");
 1130
 1131                    b.Property<string>("Filename")
 1132                        .HasColumnType("TEXT");
 1133
 1134                    b.Property<string>("MimeType")
 1135                        .HasColumnType("TEXT");
 1136
 1137                    b.HasKey("ItemId", "Index");
 1138
 1139                    b.ToTable("AttachmentStreamInfos");
 1140
 1141                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1142                });
 143
 1144            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 1145                {
 1146                    b.Property<Guid>("Id")
 1147                        .ValueGeneratedOnAdd()
 1148                        .HasColumnType("TEXT");
 1149
 1150                    b.Property<string>("Album")
 1151                        .HasColumnType("TEXT");
 1152
 1153                    b.Property<string>("AlbumArtists")
 1154                        .HasColumnType("TEXT");
 1155
 1156                    b.Property<string>("Artists")
 1157                        .HasColumnType("TEXT");
 1158
 1159                    b.Property<int?>("Audio")
 1160                        .HasColumnType("INTEGER");
 1161
 1162                    b.Property<Guid?>("ChannelId")
 1163                        .HasColumnType("TEXT");
 1164
 1165                    b.Property<string>("CleanName")
 1166                        .HasColumnType("TEXT");
 1167
 1168                    b.Property<float?>("CommunityRating")
 1169                        .HasColumnType("REAL");
 1170
 1171                    b.Property<float?>("CriticRating")
 1172                        .HasColumnType("REAL");
 1173
 1174                    b.Property<string>("CustomRating")
 1175                        .HasColumnType("TEXT");
 1176
 1177                    b.Property<string>("Data")
 1178                        .HasColumnType("TEXT");
 1179
 1180                    b.Property<DateTime?>("DateCreated")
 1181                        .HasColumnType("TEXT");
 1182
 1183                    b.Property<DateTime?>("DateLastMediaAdded")
 1184                        .HasColumnType("TEXT");
 1185
 1186                    b.Property<DateTime?>("DateLastRefreshed")
 1187                        .HasColumnType("TEXT");
 1188
 1189                    b.Property<DateTime?>("DateLastSaved")
 1190                        .HasColumnType("TEXT");
 1191
 1192                    b.Property<DateTime?>("DateModified")
 1193                        .HasColumnType("TEXT");
 1194
 1195                    b.Property<DateTime?>("EndDate")
 1196                        .HasColumnType("TEXT");
 1197
 1198                    b.Property<string>("EpisodeTitle")
 1199                        .HasColumnType("TEXT");
 1200
 1201                    b.Property<string>("ExternalId")
 1202                        .HasColumnType("TEXT");
 1203
 1204                    b.Property<string>("ExternalSeriesId")
 1205                        .HasColumnType("TEXT");
 1206
 1207                    b.Property<string>("ExternalServiceId")
 1208                        .HasColumnType("TEXT");
 1209
 1210                    b.Property<int?>("ExtraType")
 1211                        .HasColumnType("INTEGER");
 1212
 1213                    b.Property<string>("ForcedSortName")
 1214                        .HasColumnType("TEXT");
 1215
 1216                    b.Property<string>("Genres")
 1217                        .HasColumnType("TEXT");
 1218
 1219                    b.Property<int?>("Height")
 1220                        .HasColumnType("INTEGER");
 1221
 1222                    b.Property<int?>("IndexNumber")
 1223                        .HasColumnType("INTEGER");
 1224
 1225                    b.Property<int?>("InheritedParentalRatingSubValue")
 1226                        .HasColumnType("INTEGER");
 1227
 1228                    b.Property<int?>("InheritedParentalRatingValue")
 1229                        .HasColumnType("INTEGER");
 1230
 1231                    b.Property<bool>("IsFolder")
 1232                        .HasColumnType("INTEGER");
 1233
 1234                    b.Property<bool>("IsInMixedFolder")
 1235                        .HasColumnType("INTEGER");
 1236
 1237                    b.Property<bool>("IsLocked")
 1238                        .HasColumnType("INTEGER");
 1239
 1240                    b.Property<bool>("IsMovie")
 1241                        .HasColumnType("INTEGER");
 1242
 1243                    b.Property<bool>("IsRepeat")
 1244                        .HasColumnType("INTEGER");
 1245
 1246                    b.Property<bool>("IsSeries")
 1247                        .HasColumnType("INTEGER");
 1248
 1249                    b.Property<bool>("IsVirtualItem")
 1250                        .HasColumnType("INTEGER");
 1251
 1252                    b.Property<float?>("LUFS")
 1253                        .HasColumnType("REAL");
 1254
 1255                    b.Property<string>("MediaType")
 1256                        .HasColumnType("TEXT");
 1257
 1258                    b.Property<string>("Name")
 1259                        .HasColumnType("TEXT");
 1260
 1261                    b.Property<float?>("NormalizationGain")
 1262                        .HasColumnType("REAL");
 1263
 1264                    b.Property<string>("OfficialRating")
 1265                        .HasColumnType("TEXT");
 1266
 1267                    b.Property<string>("OriginalLanguage")
 1268                        .HasColumnType("TEXT");
 1269
 1270                    b.Property<string>("OriginalTitle")
 1271                        .HasColumnType("TEXT");
 1272
 1273                    b.Property<string>("Overview")
 1274                        .HasColumnType("TEXT");
 1275
 1276                    b.Property<Guid?>("OwnerId")
 1277                        .HasColumnType("TEXT");
 1278
 1279                    b.Property<Guid?>("ParentId")
 1280                        .HasColumnType("TEXT");
 1281
 1282                    b.Property<int?>("ParentIndexNumber")
 1283                        .HasColumnType("INTEGER");
 1284
 1285                    b.Property<string>("Path")
 1286                        .HasColumnType("TEXT");
 1287
 1288                    b.Property<string>("PreferredMetadataCountryCode")
 1289                        .HasColumnType("TEXT");
 1290
 1291                    b.Property<string>("PreferredMetadataLanguage")
 1292                        .HasColumnType("TEXT");
 1293
 1294                    b.Property<DateTime?>("PremiereDate")
 1295                        .HasColumnType("TEXT");
 1296
 1297                    b.Property<string>("PresentationUniqueKey")
 1298                        .HasColumnType("TEXT");
 1299
 1300                    b.Property<Guid?>("PrimaryVersionId")
 1301                        .HasColumnType("TEXT");
 1302
 1303                    b.Property<string>("ProductionLocations")
 1304                        .HasColumnType("TEXT");
 1305
 1306                    b.Property<int?>("ProductionYear")
 1307                        .HasColumnType("INTEGER");
 1308
 1309                    b.Property<long?>("RunTimeTicks")
 1310                        .HasColumnType("INTEGER");
 1311
 1312                    b.Property<Guid?>("SeasonId")
 1313                        .HasColumnType("TEXT");
 1314
 1315                    b.Property<string>("SeasonName")
 1316                        .HasColumnType("TEXT");
 1317
 1318                    b.Property<Guid?>("SeriesId")
 1319                        .HasColumnType("TEXT");
 1320
 1321                    b.Property<string>("SeriesName")
 1322                        .HasColumnType("TEXT");
 1323
 1324                    b.Property<string>("SeriesPresentationUniqueKey")
 1325                        .HasColumnType("TEXT");
 1326
 1327                    b.Property<string>("ShowId")
 1328                        .HasColumnType("TEXT");
 1329
 1330                    b.Property<long?>("Size")
 1331                        .HasColumnType("INTEGER");
 1332
 1333                    b.Property<string>("SortName")
 1334                        .HasColumnType("TEXT");
 1335
 1336                    b.Property<DateTime?>("StartDate")
 1337                        .HasColumnType("TEXT");
 1338
 1339                    b.Property<string>("Studios")
 1340                        .HasColumnType("TEXT");
 1341
 1342                    b.Property<string>("Tagline")
 1343                        .HasColumnType("TEXT");
 1344
 1345                    b.Property<string>("Tags")
 1346                        .HasColumnType("TEXT");
 1347
 1348                    b.Property<Guid?>("TopParentId")
 1349                        .HasColumnType("TEXT");
 1350
 1351                    b.Property<int?>("TotalBitrate")
 1352                        .HasColumnType("INTEGER");
 1353
 1354                    b.Property<string>("Type")
 1355                        .IsRequired()
 1356                        .HasColumnType("TEXT");
 1357
 1358                    b.Property<string>("UnratedType")
 1359                        .HasColumnType("TEXT");
 1360
 1361                    b.Property<int?>("Width")
 1362                        .HasColumnType("INTEGER");
 1363
 1364                    b.HasKey("Id");
 1365
 1366                    b.HasIndex("Name");
 1367
 1368                    b.HasIndex("OwnerId");
 1369
 1370                    b.HasIndex("ParentId");
 1371
 1372                    b.HasIndex("Path");
 1373
 1374                    b.HasIndex("PresentationUniqueKey");
 1375
 1376                    b.HasIndex("PrimaryVersionId")
 1377                        .HasFilter("\"PrimaryVersionId\" IS NOT NULL");
 1378
 1379                    b.HasIndex("SeasonId");
 1380
 1381                    b.HasIndex("SeriesId");
 1382
 1383                    b.HasIndex("SeriesName");
 1384
 1385                    b.HasIndex("ExtraType", "OwnerId");
 1386
 1387                    b.HasIndex("TopParentId", "Id");
 1388
 1389                    b.HasIndex("Type", "CleanName");
 1390
 1391                    b.HasIndex("TopParentId", "Type", "IsVirtualItem")
 1392                        .HasFilter("\"PrimaryVersionId\" IS NULL AND (\"OwnerId\" IS NULL OR \"ExtraType\" IS NOT NULL)"
 1393
 1394                    b.HasIndex("Type", "TopParentId", "Id");
 1395
 1396                    b.HasIndex("Type", "TopParentId", "PresentationUniqueKey");
 1397
 1398                    b.HasIndex("Type", "TopParentId", "SortName");
 1399
 1400                    b.HasIndex("Type", "TopParentId", "StartDate");
 1401
 1402                    b.HasIndex("MediaType", "TopParentId", "IsVirtualItem", "PresentationUniqueKey");
 1403
 1404                    b.HasIndex("TopParentId", "IsFolder", "IsVirtualItem", "DateCreated");
 1405
 1406                    b.HasIndex("TopParentId", "MediaType", "IsVirtualItem", "DateCreated");
 1407
 1408                    b.HasIndex("TopParentId", "Type", "IsVirtualItem", "DateCreated");
 1409
 1410                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "IsFolder", "IsVirtualItem");
 1411
 1412                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "ParentIndexNumber", "IndexNumber");
 1413
 1414                    b.HasIndex("Type", "SeriesPresentationUniqueKey", "PresentationUniqueKey", "SortName");
 1415
 1416                    b.HasIndex("IsFolder", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 1417
 1418                    b.HasIndex("Type", "TopParentId", "IsVirtualItem", "PresentationUniqueKey", "DateCreated");
 1419
 1420                    b.ToTable("BaseItems");
 1421
 1422                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1423
 1424                    b.HasData(
 1425                        new
 1426                        {
 1427                            Id = new Guid("00000000-0000-0000-0000-000000000001"),
 1428                            IsFolder = false,
 1429                            IsInMixedFolder = false,
 1430                            IsLocked = false,
 1431                            IsMovie = false,
 1432                            IsRepeat = false,
 1433                            IsSeries = false,
 1434                            IsVirtualItem = false,
 1435                            Name = "This is a placeholder item for UserData that has been detached from its original ite
 1436                            Type = "PLACEHOLDER"
 1437                        });
 1438                });
 439
 1440            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 1441                {
 1442                    b.Property<Guid>("Id")
 1443                        .ValueGeneratedOnAdd()
 1444                        .HasColumnType("TEXT");
 1445
 1446                    b.Property<byte[]>("Blurhash")
 1447                        .HasColumnType("BLOB");
 1448
 1449                    b.Property<DateTime?>("DateModified")
 1450                        .HasColumnType("TEXT");
 1451
 1452                    b.Property<int>("Height")
 1453                        .HasColumnType("INTEGER");
 1454
 1455                    b.Property<int>("ImageType")
 1456                        .HasColumnType("INTEGER");
 1457
 1458                    b.Property<Guid>("ItemId")
 1459                        .HasColumnType("TEXT");
 1460
 1461                    b.Property<string>("Path")
 1462                        .IsRequired()
 1463                        .HasColumnType("TEXT");
 1464
 1465                    b.Property<int>("Width")
 1466                        .HasColumnType("INTEGER");
 1467
 1468                    b.HasKey("Id");
 1469
 1470                    b.HasIndex("ItemId", "ImageType");
 1471
 1472                    b.ToTable("BaseItemImageInfos");
 1473
 1474                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1475                });
 476
 1477            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 1478                {
 1479                    b.Property<int>("Id")
 1480                        .HasColumnType("INTEGER");
 1481
 1482                    b.Property<Guid>("ItemId")
 1483                        .HasColumnType("TEXT");
 1484
 1485                    b.HasKey("Id", "ItemId");
 1486
 1487                    b.HasIndex("ItemId");
 1488
 1489                    b.ToTable("BaseItemMetadataFields");
 1490
 1491                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1492                });
 493
 1494            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 1495                {
 1496                    b.Property<Guid>("ItemId")
 1497                        .HasColumnType("TEXT");
 1498
 1499                    b.Property<string>("ProviderId")
 1500                        .HasColumnType("TEXT");
 1501
 1502                    b.Property<string>("ProviderValue")
 1503                        .IsRequired()
 1504                        .HasColumnType("TEXT");
 1505
 1506                    b.HasKey("ItemId", "ProviderId");
 1507
 1508                    b.HasIndex("ProviderId", "ItemId", "ProviderValue");
 1509
 1510                    b.ToTable("BaseItemProviders");
 1511
 1512                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1513                });
 514
 1515            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 1516                {
 1517                    b.Property<int>("Id")
 1518                        .HasColumnType("INTEGER");
 1519
 1520                    b.Property<Guid>("ItemId")
 1521                        .HasColumnType("TEXT");
 1522
 1523                    b.HasKey("Id", "ItemId");
 1524
 1525                    b.HasIndex("ItemId");
 1526
 1527                    b.ToTable("BaseItemTrailerTypes");
 1528
 1529                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1530                });
 531
 1532            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 1533                {
 1534                    b.Property<Guid>("ItemId")
 1535                        .HasColumnType("TEXT");
 1536
 1537                    b.Property<int>("ChapterIndex")
 1538                        .HasColumnType("INTEGER");
 1539
 1540                    b.Property<DateTime?>("ImageDateModified")
 1541                        .HasColumnType("TEXT");
 1542
 1543                    b.Property<string>("ImagePath")
 1544                        .HasColumnType("TEXT");
 1545
 1546                    b.Property<string>("Name")
 1547                        .HasColumnType("TEXT");
 1548
 1549                    b.Property<long>("StartPositionTicks")
 1550                        .HasColumnType("INTEGER");
 1551
 1552                    b.HasKey("ItemId", "ChapterIndex");
 1553
 1554                    b.ToTable("Chapters");
 1555
 1556                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1557                });
 558
 1559            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.CustomItemDisplayPreferences", b =>
 1560                {
 1561                    b.Property<int>("Id")
 1562                        .ValueGeneratedOnAdd()
 1563                        .HasColumnType("INTEGER");
 1564
 1565                    b.Property<string>("Client")
 1566                        .IsRequired()
 1567                        .HasMaxLength(32)
 1568                        .HasColumnType("TEXT");
 1569
 1570                    b.Property<Guid>("ItemId")
 1571                        .HasColumnType("TEXT");
 1572
 1573                    b.Property<string>("Key")
 1574                        .IsRequired()
 1575                        .HasColumnType("TEXT");
 1576
 1577                    b.Property<Guid>("UserId")
 1578                        .HasColumnType("TEXT");
 1579
 1580                    b.Property<string>("Value")
 1581                        .HasColumnType("TEXT");
 1582
 1583                    b.HasKey("Id");
 1584
 1585                    b.HasIndex("UserId", "ItemId", "Client", "Key")
 1586                        .IsUnique();
 1587
 1588                    b.ToTable("CustomItemDisplayPreferences");
 1589
 1590                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1591                });
 592
 1593            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 1594                {
 1595                    b.Property<int>("Id")
 1596                        .ValueGeneratedOnAdd()
 1597                        .HasColumnType("INTEGER");
 1598
 1599                    b.Property<int>("ChromecastVersion")
 1600                        .HasColumnType("INTEGER");
 1601
 1602                    b.Property<string>("Client")
 1603                        .IsRequired()
 1604                        .HasMaxLength(32)
 1605                        .HasColumnType("TEXT");
 1606
 1607                    b.Property<string>("DashboardTheme")
 1608                        .HasMaxLength(32)
 1609                        .HasColumnType("TEXT");
 1610
 1611                    b.Property<bool>("EnableNextVideoInfoOverlay")
 1612                        .HasColumnType("INTEGER");
 1613
 1614                    b.Property<int?>("IndexBy")
 1615                        .HasColumnType("INTEGER");
 1616
 1617                    b.Property<Guid>("ItemId")
 1618                        .HasColumnType("TEXT");
 1619
 1620                    b.Property<int>("ScrollDirection")
 1621                        .HasColumnType("INTEGER");
 1622
 1623                    b.Property<bool>("ShowBackdrop")
 1624                        .HasColumnType("INTEGER");
 1625
 1626                    b.Property<bool>("ShowSidebar")
 1627                        .HasColumnType("INTEGER");
 1628
 1629                    b.Property<int>("SkipBackwardLength")
 1630                        .HasColumnType("INTEGER");
 1631
 1632                    b.Property<int>("SkipForwardLength")
 1633                        .HasColumnType("INTEGER");
 1634
 1635                    b.Property<string>("TvHome")
 1636                        .HasMaxLength(32)
 1637                        .HasColumnType("TEXT");
 1638
 1639                    b.Property<Guid>("UserId")
 1640                        .HasColumnType("TEXT");
 1641
 1642                    b.HasKey("Id");
 1643
 1644                    b.HasIndex("UserId", "ItemId", "Client")
 1645                        .IsUnique();
 1646
 1647                    b.ToTable("DisplayPreferences");
 1648
 1649                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1650                });
 651
 1652            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 1653                {
 1654                    b.Property<int>("Id")
 1655                        .ValueGeneratedOnAdd()
 1656                        .HasColumnType("INTEGER");
 1657
 1658                    b.Property<int>("DisplayPreferencesId")
 1659                        .HasColumnType("INTEGER");
 1660
 1661                    b.Property<int>("Order")
 1662                        .HasColumnType("INTEGER");
 1663
 1664                    b.Property<int>("Type")
 1665                        .HasColumnType("INTEGER");
 1666
 1667                    b.HasKey("Id");
 1668
 1669                    b.HasIndex("DisplayPreferencesId");
 1670
 1671                    b.ToTable("HomeSection");
 1672
 1673                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1674                });
 675
 1676            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 1677                {
 1678                    b.Property<int>("Id")
 1679                        .ValueGeneratedOnAdd()
 1680                        .HasColumnType("INTEGER");
 1681
 1682                    b.Property<DateTime>("LastModified")
 1683                        .HasColumnType("TEXT");
 1684
 1685                    b.Property<string>("Path")
 1686                        .IsRequired()
 1687                        .HasMaxLength(512)
 1688                        .HasColumnType("TEXT");
 1689
 1690                    b.Property<Guid?>("UserId")
 1691                        .HasColumnType("TEXT");
 1692
 1693                    b.HasKey("Id");
 1694
 1695                    b.HasIndex("UserId")
 1696                        .IsUnique();
 1697
 1698                    b.ToTable("ImageInfos");
 1699
 1700                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1701                });
 702
 1703            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 1704                {
 1705                    b.Property<int>("Id")
 1706                        .ValueGeneratedOnAdd()
 1707                        .HasColumnType("INTEGER");
 1708
 1709                    b.Property<string>("Client")
 1710                        .IsRequired()
 1711                        .HasMaxLength(32)
 1712                        .HasColumnType("TEXT");
 1713
 1714                    b.Property<int?>("IndexBy")
 1715                        .HasColumnType("INTEGER");
 1716
 1717                    b.Property<Guid>("ItemId")
 1718                        .HasColumnType("TEXT");
 1719
 1720                    b.Property<bool>("RememberIndexing")
 1721                        .HasColumnType("INTEGER");
 1722
 1723                    b.Property<bool>("RememberSorting")
 1724                        .HasColumnType("INTEGER");
 1725
 1726                    b.Property<string>("SortBy")
 1727                        .IsRequired()
 1728                        .HasMaxLength(64)
 1729                        .HasColumnType("TEXT");
 1730
 1731                    b.Property<int>("SortOrder")
 1732                        .HasColumnType("INTEGER");
 1733
 1734                    b.Property<Guid>("UserId")
 1735                        .HasColumnType("TEXT");
 1736
 1737                    b.Property<int>("ViewType")
 1738                        .HasColumnType("INTEGER");
 1739
 1740                    b.HasKey("Id");
 1741
 1742                    b.HasIndex("UserId");
 1743
 1744                    b.ToTable("ItemDisplayPreferences");
 1745
 1746                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1747                });
 748
 1749            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 1750                {
 1751                    b.Property<Guid>("ItemValueId")
 1752                        .ValueGeneratedOnAdd()
 1753                        .HasColumnType("TEXT");
 1754
 1755                    b.Property<string>("CleanValue")
 1756                        .IsRequired()
 1757                        .HasColumnType("TEXT");
 1758
 1759                    b.Property<int>("Type")
 1760                        .HasColumnType("INTEGER");
 1761
 1762                    b.Property<string>("Value")
 1763                        .IsRequired()
 1764                        .HasColumnType("TEXT");
 1765
 1766                    b.HasKey("ItemValueId");
 1767
 1768                    b.HasIndex("Type", "CleanValue");
 1769
 1770                    b.HasIndex("Type", "Value")
 1771                        .IsUnique();
 1772
 1773                    b.ToTable("ItemValues");
 1774
 1775                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1776                });
 777
 1778            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 1779                {
 1780                    b.Property<Guid>("ItemValueId")
 1781                        .HasColumnType("TEXT");
 1782
 1783                    b.Property<Guid>("ItemId")
 1784                        .HasColumnType("TEXT");
 1785
 1786                    b.HasKey("ItemValueId", "ItemId");
 1787
 1788                    b.HasIndex("ItemId");
 1789
 1790                    b.ToTable("ItemValuesMap");
 1791
 1792                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1793                });
 794
 1795            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 1796                {
 1797                    b.Property<Guid>("ItemId")
 1798                        .HasColumnType("TEXT");
 1799
 1800                    b.PrimitiveCollection<string>("KeyframeTicks")
 1801                        .HasColumnType("TEXT");
 1802
 1803                    b.Property<long>("TotalDuration")
 1804                        .HasColumnType("INTEGER");
 1805
 1806                    b.HasKey("ItemId");
 1807
 1808                    b.ToTable("KeyframeData");
 1809
 1810                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1811                });
 812
 1813            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 1814                {
 1815                    b.Property<Guid>("ParentId")
 1816                        .HasColumnType("TEXT");
 1817
 1818                    b.Property<int>("SortOrder")
 1819                        .HasColumnType("INTEGER");
 1820
 1821                    b.Property<Guid>("ChildId")
 1822                        .HasColumnType("TEXT");
 1823
 1824                    b.Property<int>("ChildType")
 1825                        .HasColumnType("INTEGER");
 1826
 1827                    b.HasKey("ParentId", "SortOrder");
 1828
 1829                    b.HasIndex("ChildId", "ChildType");
 1830
 1831                    b.HasIndex("ParentId", "ChildType");
 1832
 1833                    b.ToTable("LinkedChildren", (string)null);
 1834
 1835                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1836                });
 837
 1838            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaSegment", b =>
 1839                {
 1840                    b.Property<Guid>("Id")
 1841                        .ValueGeneratedOnAdd()
 1842                        .HasColumnType("TEXT");
 1843
 1844                    b.Property<long>("EndTicks")
 1845                        .HasColumnType("INTEGER");
 1846
 1847                    b.Property<Guid>("ItemId")
 1848                        .HasColumnType("TEXT");
 1849
 1850                    b.Property<string>("SegmentProviderId")
 1851                        .IsRequired()
 1852                        .HasColumnType("TEXT");
 1853
 1854                    b.Property<long>("StartTicks")
 1855                        .HasColumnType("INTEGER");
 1856
 1857                    b.Property<int>("Type")
 1858                        .HasColumnType("INTEGER");
 1859
 1860                    b.HasKey("Id");
 1861
 1862                    b.ToTable("MediaSegments");
 1863
 1864                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 1865                });
 866
 1867            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 1868                {
 1869                    b.Property<Guid>("ItemId")
 1870                        .HasColumnType("TEXT");
 1871
 1872                    b.Property<int>("StreamIndex")
 1873                        .HasColumnType("INTEGER");
 1874
 1875                    b.Property<string>("AspectRatio")
 1876                        .HasColumnType("TEXT");
 1877
 1878                    b.Property<float?>("AverageFrameRate")
 1879                        .HasColumnType("REAL");
 1880
 1881                    b.Property<int?>("BitDepth")
 1882                        .HasColumnType("INTEGER");
 1883
 1884                    b.Property<int?>("BitRate")
 1885                        .HasColumnType("INTEGER");
 1886
 1887                    b.Property<int?>("BlPresentFlag")
 1888                        .HasColumnType("INTEGER");
 1889
 1890                    b.Property<string>("ChannelLayout")
 1891                        .HasColumnType("TEXT");
 1892
 1893                    b.Property<int?>("Channels")
 1894                        .HasColumnType("INTEGER");
 1895
 1896                    b.Property<string>("Codec")
 1897                        .HasColumnType("TEXT");
 1898
 1899                    b.Property<string>("CodecTag")
 1900                        .HasColumnType("TEXT");
 1901
 1902                    b.Property<string>("CodecTimeBase")
 1903                        .HasColumnType("TEXT");
 1904
 1905                    b.Property<string>("ColorPrimaries")
 1906                        .HasColumnType("TEXT");
 1907
 1908                    b.Property<string>("ColorSpace")
 1909                        .HasColumnType("TEXT");
 1910
 1911                    b.Property<string>("ColorTransfer")
 1912                        .HasColumnType("TEXT");
 1913
 1914                    b.Property<string>("Comment")
 1915                        .HasColumnType("TEXT");
 1916
 1917                    b.Property<int?>("DvBlSignalCompatibilityId")
 1918                        .HasColumnType("INTEGER");
 1919
 1920                    b.Property<int?>("DvLevel")
 1921                        .HasColumnType("INTEGER");
 1922
 1923                    b.Property<int?>("DvProfile")
 1924                        .HasColumnType("INTEGER");
 1925
 1926                    b.Property<int?>("DvVersionMajor")
 1927                        .HasColumnType("INTEGER");
 1928
 1929                    b.Property<int?>("DvVersionMinor")
 1930                        .HasColumnType("INTEGER");
 1931
 1932                    b.Property<int?>("ElPresentFlag")
 1933                        .HasColumnType("INTEGER");
 1934
 1935                    b.Property<bool?>("Hdr10PlusPresentFlag")
 1936                        .HasColumnType("INTEGER");
 1937
 1938                    b.Property<int?>("Height")
 1939                        .HasColumnType("INTEGER");
 1940
 1941                    b.Property<bool?>("IsAnamorphic")
 1942                        .HasColumnType("INTEGER");
 1943
 1944                    b.Property<bool?>("IsAvc")
 1945                        .HasColumnType("INTEGER");
 1946
 1947                    b.Property<bool>("IsDefault")
 1948                        .HasColumnType("INTEGER");
 1949
 1950                    b.Property<bool>("IsExternal")
 1951                        .HasColumnType("INTEGER");
 1952
 1953                    b.Property<bool>("IsForced")
 1954                        .HasColumnType("INTEGER");
 1955
 1956                    b.Property<bool?>("IsHearingImpaired")
 1957                        .HasColumnType("INTEGER");
 1958
 1959                    b.Property<bool?>("IsInterlaced")
 1960                        .HasColumnType("INTEGER");
 1961
 1962                    b.Property<bool>("IsOriginal")
 1963                        .HasColumnType("INTEGER");
 1964
 1965                    b.Property<string>("KeyFrames")
 1966                        .HasColumnType("TEXT");
 1967
 1968                    b.Property<string>("Language")
 1969                        .HasColumnType("TEXT");
 1970
 1971                    b.Property<float?>("Level")
 1972                        .HasColumnType("REAL");
 1973
 1974                    b.Property<string>("NalLengthSize")
 1975                        .HasColumnType("TEXT");
 1976
 1977                    b.Property<string>("Path")
 1978                        .HasColumnType("TEXT");
 1979
 1980                    b.Property<string>("PixelFormat")
 1981                        .HasColumnType("TEXT");
 1982
 1983                    b.Property<string>("Profile")
 1984                        .HasColumnType("TEXT");
 1985
 1986                    b.Property<float?>("RealFrameRate")
 1987                        .HasColumnType("REAL");
 1988
 1989                    b.Property<int?>("RefFrames")
 1990                        .HasColumnType("INTEGER");
 1991
 1992                    b.Property<int?>("Rotation")
 1993                        .HasColumnType("INTEGER");
 1994
 1995                    b.Property<int?>("RpuPresentFlag")
 1996                        .HasColumnType("INTEGER");
 1997
 1998                    b.Property<int?>("SampleRate")
 1999                        .HasColumnType("INTEGER");
 11000
 11001                    b.Property<int>("StreamType")
 11002                        .HasColumnType("INTEGER");
 11003
 11004                    b.Property<string>("TimeBase")
 11005                        .HasColumnType("TEXT");
 11006
 11007                    b.Property<string>("Title")
 11008                        .HasColumnType("TEXT");
 11009
 11010                    b.Property<int?>("Width")
 11011                        .HasColumnType("INTEGER");
 11012
 11013                    b.HasKey("ItemId", "StreamIndex");
 11014
 11015                    b.ToTable("MediaStreamInfos");
 11016
 11017                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11018                });
 1019
 11020            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 11021                {
 11022                    b.Property<Guid>("Id")
 11023                        .ValueGeneratedOnAdd()
 11024                        .HasColumnType("TEXT");
 11025
 11026                    b.Property<string>("Name")
 11027                        .IsRequired()
 11028                        .HasColumnType("TEXT");
 11029
 11030                    b.Property<string>("PersonType")
 11031                        .HasColumnType("TEXT");
 11032
 11033                    b.HasKey("Id");
 11034
 11035                    b.HasIndex("Name");
 11036
 11037                    b.ToTable("Peoples");
 11038
 11039                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11040                });
 1041
 11042            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 11043                {
 11044                    b.Property<Guid>("ItemId")
 11045                        .HasColumnType("TEXT");
 11046
 11047                    b.Property<Guid>("PeopleId")
 11048                        .HasColumnType("TEXT");
 11049
 11050                    b.Property<string>("Role")
 11051                        .HasColumnType("TEXT");
 11052
 11053                    b.Property<int?>("ListOrder")
 11054                        .HasColumnType("INTEGER");
 11055
 11056                    b.Property<int?>("SortOrder")
 11057                        .HasColumnType("INTEGER");
 11058
 11059                    b.HasKey("ItemId", "PeopleId", "Role");
 11060
 11061                    b.HasIndex("ItemId", "ListOrder");
 11062
 11063                    b.HasIndex("ItemId", "SortOrder");
 11064
 11065                    b.HasIndex("PeopleId", "ItemId");
 11066
 11067                    b.ToTable("PeopleBaseItemMap");
 11068
 11069                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11070                });
 1071
 11072            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 11073                {
 11074                    b.Property<int>("Id")
 11075                        .ValueGeneratedOnAdd()
 11076                        .HasColumnType("INTEGER");
 11077
 11078                    b.Property<int>("Kind")
 11079                        .HasColumnType("INTEGER");
 11080
 11081                    b.Property<Guid?>("Permission_Permissions_Guid")
 11082                        .HasColumnType("TEXT");
 11083
 11084                    b.Property<uint>("RowVersion")
 11085                        .IsConcurrencyToken()
 11086                        .HasColumnType("INTEGER");
 11087
 11088                    b.Property<Guid?>("UserId")
 11089                        .HasColumnType("TEXT");
 11090
 11091                    b.Property<bool>("Value")
 11092                        .HasColumnType("INTEGER");
 11093
 11094                    b.HasKey("Id");
 11095
 11096                    b.HasIndex("UserId", "Kind")
 11097                        .IsUnique()
 11098                        .HasFilter("[UserId] IS NOT NULL");
 11099
 11100                    b.ToTable("Permissions");
 11101
 11102                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11103                });
 1104
 11105            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 11106                {
 11107                    b.Property<int>("Id")
 11108                        .ValueGeneratedOnAdd()
 11109                        .HasColumnType("INTEGER");
 11110
 11111                    b.Property<int>("Kind")
 11112                        .HasColumnType("INTEGER");
 11113
 11114                    b.Property<Guid?>("Preference_Preferences_Guid")
 11115                        .HasColumnType("TEXT");
 11116
 11117                    b.Property<uint>("RowVersion")
 11118                        .IsConcurrencyToken()
 11119                        .HasColumnType("INTEGER");
 11120
 11121                    b.Property<Guid?>("UserId")
 11122                        .HasColumnType("TEXT");
 11123
 11124                    b.Property<string>("Value")
 11125                        .IsRequired()
 11126                        .HasMaxLength(65535)
 11127                        .HasColumnType("TEXT");
 11128
 11129                    b.HasKey("Id");
 11130
 11131                    b.HasIndex("UserId", "Kind")
 11132                        .IsUnique()
 11133                        .HasFilter("[UserId] IS NOT NULL");
 11134
 11135                    b.ToTable("Preferences");
 11136
 11137                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11138                });
 1139
 11140            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.ApiKey", b =>
 11141                {
 11142                    b.Property<int>("Id")
 11143                        .ValueGeneratedOnAdd()
 11144                        .HasColumnType("INTEGER");
 11145
 11146                    b.Property<string>("AccessToken")
 11147                        .IsRequired()
 11148                        .HasColumnType("TEXT");
 11149
 11150                    b.Property<DateTime>("DateCreated")
 11151                        .HasColumnType("TEXT");
 11152
 11153                    b.Property<DateTime>("DateLastActivity")
 11154                        .HasColumnType("TEXT");
 11155
 11156                    b.Property<string>("Name")
 11157                        .IsRequired()
 11158                        .HasMaxLength(64)
 11159                        .HasColumnType("TEXT");
 11160
 11161                    b.HasKey("Id");
 11162
 11163                    b.HasIndex("AccessToken")
 11164                        .IsUnique();
 11165
 11166                    b.ToTable("ApiKeys");
 11167
 11168                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11169                });
 1170
 11171            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 11172                {
 11173                    b.Property<int>("Id")
 11174                        .ValueGeneratedOnAdd()
 11175                        .HasColumnType("INTEGER");
 11176
 11177                    b.Property<string>("AccessToken")
 11178                        .IsRequired()
 11179                        .HasColumnType("TEXT");
 11180
 11181                    b.Property<string>("AppName")
 11182                        .IsRequired()
 11183                        .HasMaxLength(64)
 11184                        .HasColumnType("TEXT");
 11185
 11186                    b.Property<string>("AppVersion")
 11187                        .IsRequired()
 11188                        .HasMaxLength(32)
 11189                        .HasColumnType("TEXT");
 11190
 11191                    b.Property<DateTime>("DateCreated")
 11192                        .HasColumnType("TEXT");
 11193
 11194                    b.Property<DateTime>("DateLastActivity")
 11195                        .HasColumnType("TEXT");
 11196
 11197                    b.Property<DateTime>("DateModified")
 11198                        .HasColumnType("TEXT");
 11199
 11200                    b.Property<string>("DeviceId")
 11201                        .IsRequired()
 11202                        .HasMaxLength(256)
 11203                        .HasColumnType("TEXT");
 11204
 11205                    b.Property<string>("DeviceName")
 11206                        .IsRequired()
 11207                        .HasMaxLength(64)
 11208                        .HasColumnType("TEXT");
 11209
 11210                    b.Property<bool>("IsActive")
 11211                        .HasColumnType("INTEGER");
 11212
 11213                    b.Property<Guid>("UserId")
 11214                        .HasColumnType("TEXT");
 11215
 11216                    b.HasKey("Id");
 11217
 11218                    b.HasIndex("AccessToken", "DateLastActivity");
 11219
 11220                    b.HasIndex("DeviceId", "DateLastActivity");
 11221
 11222                    b.HasIndex("UserId", "DeviceId");
 11223
 11224                    b.ToTable("Devices");
 11225
 11226                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11227                });
 1228
 11229            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.DeviceOptions", b =>
 11230                {
 11231                    b.Property<int>("Id")
 11232                        .ValueGeneratedOnAdd()
 11233                        .HasColumnType("INTEGER");
 11234
 11235                    b.Property<string>("CustomName")
 11236                        .HasColumnType("TEXT");
 11237
 11238                    b.Property<string>("DeviceId")
 11239                        .IsRequired()
 11240                        .HasColumnType("TEXT");
 11241
 11242                    b.HasKey("Id");
 11243
 11244                    b.HasIndex("DeviceId")
 11245                        .IsUnique();
 11246
 11247                    b.ToTable("DeviceOptions");
 11248
 11249                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11250                });
 1251
 11252            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.TrickplayInfo", b =>
 11253                {
 11254                    b.Property<Guid>("ItemId")
 11255                        .HasColumnType("TEXT");
 11256
 11257                    b.Property<int>("Width")
 11258                        .HasColumnType("INTEGER");
 11259
 11260                    b.Property<int>("Bandwidth")
 11261                        .HasColumnType("INTEGER");
 11262
 11263                    b.Property<int>("Height")
 11264                        .HasColumnType("INTEGER");
 11265
 11266                    b.Property<int>("Interval")
 11267                        .HasColumnType("INTEGER");
 11268
 11269                    b.Property<int>("ThumbnailCount")
 11270                        .HasColumnType("INTEGER");
 11271
 11272                    b.Property<int>("TileHeight")
 11273                        .HasColumnType("INTEGER");
 11274
 11275                    b.Property<int>("TileWidth")
 11276                        .HasColumnType("INTEGER");
 11277
 11278                    b.HasKey("ItemId", "Width");
 11279
 11280                    b.ToTable("TrickplayInfos");
 11281
 11282                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11283                });
 1284
 11285            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 11286                {
 11287                    b.Property<Guid>("Id")
 11288                        .ValueGeneratedOnAdd()
 11289                        .HasColumnType("TEXT");
 11290
 11291                    b.Property<string>("AudioLanguagePreference")
 11292                        .HasMaxLength(255)
 11293                        .HasColumnType("TEXT");
 11294
 11295                    b.Property<string>("AuthenticationProviderId")
 11296                        .IsRequired()
 11297                        .HasMaxLength(255)
 11298                        .HasColumnType("TEXT");
 11299
 11300                    b.Property<string>("CastReceiverId")
 11301                        .HasMaxLength(32)
 11302                        .HasColumnType("TEXT");
 11303
 11304                    b.Property<bool>("DisplayCollectionsView")
 11305                        .HasColumnType("INTEGER");
 11306
 11307                    b.Property<bool>("DisplayMissingEpisodes")
 11308                        .HasColumnType("INTEGER");
 11309
 11310                    b.Property<bool>("EnableAutoLogin")
 11311                        .HasColumnType("INTEGER");
 11312
 11313                    b.Property<bool>("EnableLocalPassword")
 11314                        .HasColumnType("INTEGER");
 11315
 11316                    b.Property<bool>("EnableNextEpisodeAutoPlay")
 11317                        .HasColumnType("INTEGER");
 11318
 11319                    b.Property<bool>("EnableUserPreferenceAccess")
 11320                        .HasColumnType("INTEGER");
 11321
 11322                    b.Property<bool>("HidePlayedInLatest")
 11323                        .HasColumnType("INTEGER");
 11324
 11325                    b.Property<long>("InternalId")
 11326                        .HasColumnType("INTEGER");
 11327
 11328                    b.Property<int>("InvalidLoginAttemptCount")
 11329                        .HasColumnType("INTEGER");
 11330
 11331                    b.Property<DateTime?>("LastActivityDate")
 11332                        .HasColumnType("TEXT");
 11333
 11334                    b.Property<DateTime?>("LastLoginDate")
 11335                        .HasColumnType("TEXT");
 11336
 11337                    b.Property<int?>("LoginAttemptsBeforeLockout")
 11338                        .HasColumnType("INTEGER");
 11339
 11340                    b.Property<int>("MaxActiveSessions")
 11341                        .HasColumnType("INTEGER");
 11342
 11343                    b.Property<int?>("MaxParentalRatingScore")
 11344                        .HasColumnType("INTEGER");
 11345
 11346                    b.Property<int?>("MaxParentalRatingSubScore")
 11347                        .HasColumnType("INTEGER");
 11348
 11349                    b.Property<bool>("MustUpdatePassword")
 11350                        .HasColumnType("INTEGER");
 11351
 11352                    b.Property<string>("NormalizedUsername")
 11353                        .IsRequired()
 11354                        .HasMaxLength(255)
 11355                        .HasColumnType("TEXT");
 11356
 11357                    b.Property<string>("Password")
 11358                        .HasMaxLength(65535)
 11359                        .HasColumnType("TEXT");
 11360
 11361                    b.Property<string>("PasswordResetProviderId")
 11362                        .IsRequired()
 11363                        .HasMaxLength(255)
 11364                        .HasColumnType("TEXT");
 11365
 11366                    b.Property<bool>("PlayDefaultAudioTrack")
 11367                        .HasColumnType("INTEGER");
 11368
 11369                    b.Property<bool>("RememberAudioSelections")
 11370                        .HasColumnType("INTEGER");
 11371
 11372                    b.Property<bool>("RememberSubtitleSelections")
 11373                        .HasColumnType("INTEGER");
 11374
 11375                    b.Property<int?>("RemoteClientBitrateLimit")
 11376                        .HasColumnType("INTEGER");
 11377
 11378                    b.Property<uint>("RowVersion")
 11379                        .IsConcurrencyToken()
 11380                        .HasColumnType("INTEGER");
 11381
 11382                    b.Property<string>("SubtitleLanguagePreference")
 11383                        .HasMaxLength(255)
 11384                        .HasColumnType("TEXT");
 11385
 11386                    b.Property<int>("SubtitleMode")
 11387                        .HasColumnType("INTEGER");
 11388
 11389                    b.Property<int>("SyncPlayAccess")
 11390                        .HasColumnType("INTEGER");
 11391
 11392                    b.Property<string>("Username")
 11393                        .IsRequired()
 11394                        .HasMaxLength(255)
 11395                        .HasColumnType("TEXT");
 11396
 11397                    b.HasKey("Id");
 11398
 11399                    b.HasIndex("NormalizedUsername")
 11400                        .IsUnique();
 11401
 11402                    b.HasIndex("Username")
 11403                        .IsUnique();
 11404
 11405                    b.ToTable("Users");
 11406
 11407                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11408                });
 1409
 11410            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 11411                {
 11412                    b.Property<Guid>("ItemId")
 11413                        .HasColumnType("TEXT");
 11414
 11415                    b.Property<Guid>("UserId")
 11416                        .HasColumnType("TEXT");
 11417
 11418                    b.Property<string>("CustomDataKey")
 11419                        .HasColumnType("TEXT");
 11420
 11421                    b.Property<int?>("AudioStreamIndex")
 11422                        .HasColumnType("INTEGER");
 11423
 11424                    b.Property<bool>("IsFavorite")
 11425                        .HasColumnType("INTEGER");
 11426
 11427                    b.Property<DateTime?>("LastPlayedDate")
 11428                        .HasColumnType("TEXT");
 11429
 11430                    b.Property<bool?>("Likes")
 11431                        .HasColumnType("INTEGER");
 11432
 11433                    b.Property<int>("PlayCount")
 11434                        .HasColumnType("INTEGER");
 11435
 11436                    b.Property<long>("PlaybackPositionTicks")
 11437                        .HasColumnType("INTEGER");
 11438
 11439                    b.Property<bool>("Played")
 11440                        .HasColumnType("INTEGER");
 11441
 11442                    b.Property<double?>("Rating")
 11443                        .HasColumnType("REAL");
 11444
 11445                    b.Property<DateTime?>("RetentionDate")
 11446                        .HasColumnType("TEXT");
 11447
 11448                    b.Property<int?>("SubtitleStreamIndex")
 11449                        .HasColumnType("INTEGER");
 11450
 11451                    b.HasKey("ItemId", "UserId", "CustomDataKey");
 11452
 11453                    b.HasIndex("ItemId", "UserId", "IsFavorite");
 11454
 11455                    b.HasIndex("ItemId", "UserId", "LastPlayedDate");
 11456
 11457                    b.HasIndex("ItemId", "UserId", "PlaybackPositionTicks");
 11458
 11459                    b.HasIndex("ItemId", "UserId", "Played");
 11460
 11461                    b.HasIndex("UserId", "IsFavorite", "ItemId");
 11462
 11463                    b.HasIndex("UserId", "ItemId", "LastPlayedDate");
 11464
 11465                    b.HasIndex("UserId", "Played", "ItemId");
 11466
 11467                    b.ToTable("UserData");
 11468
 11469                    b.HasAnnotation("Sqlite:UseSqlReturningClause", false);
 11470                });
 1471
 11472            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AccessSchedule", b =>
 11473                {
 11474                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11475                        .WithMany("AccessSchedules")
 11476                        .HasForeignKey("UserId")
 11477                        .OnDelete(DeleteBehavior.Cascade)
 11478                        .IsRequired();
 11479                });
 1480
 11481            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AncestorId", b =>
 11482                {
 11483                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11484                        .WithMany("Parents")
 11485                        .HasForeignKey("ItemId")
 11486                        .OnDelete(DeleteBehavior.Cascade)
 11487                        .IsRequired();
 11488
 11489                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "ParentItem")
 11490                        .WithMany("Children")
 11491                        .HasForeignKey("ParentItemId")
 11492                        .OnDelete(DeleteBehavior.Cascade)
 11493                        .IsRequired();
 11494
 11495                    b.Navigation("Item");
 11496
 11497                    b.Navigation("ParentItem");
 11498                });
 1499
 11500            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.AttachmentStreamInfo", b =>
 11501                {
 11502                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11503                        .WithMany()
 11504                        .HasForeignKey("ItemId")
 11505                        .OnDelete(DeleteBehavior.Cascade)
 11506                        .IsRequired();
 11507
 11508                    b.Navigation("Item");
 11509                });
 1510
 11511            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 11512                {
 11513                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Owner")
 11514                        .WithMany("Extras")
 11515                        .HasForeignKey("OwnerId")
 11516                        .OnDelete(DeleteBehavior.NoAction);
 11517
 11518                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "DirectParent")
 11519                        .WithMany("DirectChildren")
 11520                        .HasForeignKey("ParentId")
 11521                        .OnDelete(DeleteBehavior.Cascade);
 11522
 11523                    b.Navigation("DirectParent");
 11524
 11525                    b.Navigation("Owner");
 11526                });
 1527
 11528            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemImageInfo", b =>
 11529                {
 11530                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11531                        .WithMany("Images")
 11532                        .HasForeignKey("ItemId")
 11533                        .OnDelete(DeleteBehavior.Cascade)
 11534                        .IsRequired();
 11535
 11536                    b.Navigation("Item");
 11537                });
 1538
 11539            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemMetadataField", b =>
 11540                {
 11541                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11542                        .WithMany("LockedFields")
 11543                        .HasForeignKey("ItemId")
 11544                        .OnDelete(DeleteBehavior.Cascade)
 11545                        .IsRequired();
 11546
 11547                    b.Navigation("Item");
 11548                });
 1549
 11550            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemProvider", b =>
 11551                {
 11552                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11553                        .WithMany("Provider")
 11554                        .HasForeignKey("ItemId")
 11555                        .OnDelete(DeleteBehavior.Cascade)
 11556                        .IsRequired();
 11557
 11558                    b.Navigation("Item");
 11559                });
 1560
 11561            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemTrailerType", b =>
 11562                {
 11563                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11564                        .WithMany("TrailerTypes")
 11565                        .HasForeignKey("ItemId")
 11566                        .OnDelete(DeleteBehavior.Cascade)
 11567                        .IsRequired();
 11568
 11569                    b.Navigation("Item");
 11570                });
 1571
 11572            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Chapter", b =>
 11573                {
 11574                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11575                        .WithMany("Chapters")
 11576                        .HasForeignKey("ItemId")
 11577                        .OnDelete(DeleteBehavior.Cascade)
 11578                        .IsRequired();
 11579
 11580                    b.Navigation("Item");
 11581                });
 1582
 11583            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 11584                {
 11585                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11586                        .WithMany("DisplayPreferences")
 11587                        .HasForeignKey("UserId")
 11588                        .OnDelete(DeleteBehavior.Cascade)
 11589                        .IsRequired();
 11590                });
 1591
 11592            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.HomeSection", b =>
 11593                {
 11594                    b.HasOne("Jellyfin.Database.Implementations.Entities.DisplayPreferences", null)
 11595                        .WithMany("HomeSections")
 11596                        .HasForeignKey("DisplayPreferencesId")
 11597                        .OnDelete(DeleteBehavior.Cascade)
 11598                        .IsRequired();
 11599                });
 1600
 11601            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ImageInfo", b =>
 11602                {
 11603                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11604                        .WithOne("ProfileImage")
 11605                        .HasForeignKey("Jellyfin.Database.Implementations.Entities.ImageInfo", "UserId")
 11606                        .OnDelete(DeleteBehavior.Cascade);
 11607                });
 1608
 11609            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemDisplayPreferences", b =>
 11610                {
 11611                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11612                        .WithMany("ItemDisplayPreferences")
 11613                        .HasForeignKey("UserId")
 11614                        .OnDelete(DeleteBehavior.Cascade)
 11615                        .IsRequired();
 11616                });
 1617
 11618            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValueMap", b =>
 11619                {
 11620                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11621                        .WithMany("ItemValues")
 11622                        .HasForeignKey("ItemId")
 11623                        .OnDelete(DeleteBehavior.Cascade)
 11624                        .IsRequired();
 11625
 11626                    b.HasOne("Jellyfin.Database.Implementations.Entities.ItemValue", "ItemValue")
 11627                        .WithMany("BaseItemsMap")
 11628                        .HasForeignKey("ItemValueId")
 11629                        .OnDelete(DeleteBehavior.Cascade)
 11630                        .IsRequired();
 11631
 11632                    b.Navigation("Item");
 11633
 11634                    b.Navigation("ItemValue");
 11635                });
 1636
 11637            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.KeyframeData", b =>
 11638                {
 11639                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11640                        .WithMany()
 11641                        .HasForeignKey("ItemId")
 11642                        .OnDelete(DeleteBehavior.Cascade)
 11643                        .IsRequired();
 11644
 11645                    b.Navigation("Item");
 11646                });
 1647
 11648            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.LinkedChildEntity", b =>
 11649                {
 11650                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Child")
 11651                        .WithMany("LinkedChildOfEntities")
 11652                        .HasForeignKey("ChildId")
 11653                        .OnDelete(DeleteBehavior.NoAction)
 11654                        .IsRequired();
 11655
 11656                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Parent")
 11657                        .WithMany("LinkedChildEntities")
 11658                        .HasForeignKey("ParentId")
 11659                        .OnDelete(DeleteBehavior.NoAction)
 11660                        .IsRequired();
 11661
 11662                    b.Navigation("Child");
 11663
 11664                    b.Navigation("Parent");
 11665                });
 1666
 11667            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.MediaStreamInfo", b =>
 11668                {
 11669                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11670                        .WithMany("MediaStreams")
 11671                        .HasForeignKey("ItemId")
 11672                        .OnDelete(DeleteBehavior.Cascade)
 11673                        .IsRequired();
 11674
 11675                    b.Navigation("Item");
 11676                });
 1677
 11678            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.PeopleBaseItemMap", b =>
 11679                {
 11680                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11681                        .WithMany("Peoples")
 11682                        .HasForeignKey("ItemId")
 11683                        .OnDelete(DeleteBehavior.Cascade)
 11684                        .IsRequired();
 11685
 11686                    b.HasOne("Jellyfin.Database.Implementations.Entities.People", "People")
 11687                        .WithMany("BaseItems")
 11688                        .HasForeignKey("PeopleId")
 11689                        .OnDelete(DeleteBehavior.Cascade)
 11690                        .IsRequired();
 11691
 11692                    b.Navigation("Item");
 11693
 11694                    b.Navigation("People");
 11695                });
 1696
 11697            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Permission", b =>
 11698                {
 11699                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11700                        .WithMany("Permissions")
 11701                        .HasForeignKey("UserId")
 11702                        .OnDelete(DeleteBehavior.Cascade);
 11703                });
 1704
 11705            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Preference", b =>
 11706                {
 11707                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", null)
 11708                        .WithMany("Preferences")
 11709                        .HasForeignKey("UserId")
 11710                        .OnDelete(DeleteBehavior.Cascade);
 11711                });
 1712
 11713            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.Security.Device", b =>
 11714                {
 11715                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 11716                        .WithMany()
 11717                        .HasForeignKey("UserId")
 11718                        .OnDelete(DeleteBehavior.Cascade)
 11719                        .IsRequired();
 11720
 11721                    b.Navigation("User");
 11722                });
 1723
 11724            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.UserData", b =>
 11725                {
 11726                    b.HasOne("Jellyfin.Database.Implementations.Entities.BaseItemEntity", "Item")
 11727                        .WithMany("UserData")
 11728                        .HasForeignKey("ItemId")
 11729                        .OnDelete(DeleteBehavior.Cascade)
 11730                        .IsRequired();
 11731
 11732                    b.HasOne("Jellyfin.Database.Implementations.Entities.User", "User")
 11733                        .WithMany()
 11734                        .HasForeignKey("UserId")
 11735                        .OnDelete(DeleteBehavior.Cascade)
 11736                        .IsRequired();
 11737
 11738                    b.Navigation("Item");
 11739
 11740                    b.Navigation("User");
 11741                });
 1742
 11743            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.BaseItemEntity", b =>
 11744                {
 11745                    b.Navigation("Chapters");
 11746
 11747                    b.Navigation("Children");
 11748
 11749                    b.Navigation("DirectChildren");
 11750
 11751                    b.Navigation("Extras");
 11752
 11753                    b.Navigation("Images");
 11754
 11755                    b.Navigation("ItemValues");
 11756
 11757                    b.Navigation("LinkedChildEntities");
 11758
 11759                    b.Navigation("LinkedChildOfEntities");
 11760
 11761                    b.Navigation("LockedFields");
 11762
 11763                    b.Navigation("MediaStreams");
 11764
 11765                    b.Navigation("Parents");
 11766
 11767                    b.Navigation("Peoples");
 11768
 11769                    b.Navigation("Provider");
 11770
 11771                    b.Navigation("TrailerTypes");
 11772
 11773                    b.Navigation("UserData");
 11774                });
 1775
 11776            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.DisplayPreferences", b =>
 11777                {
 11778                    b.Navigation("HomeSections");
 11779                });
 1780
 11781            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.ItemValue", b =>
 11782                {
 11783                    b.Navigation("BaseItemsMap");
 11784                });
 1785
 11786            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.People", b =>
 11787                {
 11788                    b.Navigation("BaseItems");
 11789                });
 1790
 11791            modelBuilder.Entity("Jellyfin.Database.Implementations.Entities.User", b =>
 11792                {
 11793                    b.Navigation("AccessSchedules");
 11794
 11795                    b.Navigation("DisplayPreferences");
 11796
 11797                    b.Navigation("ItemDisplayPreferences");
 11798
 11799                    b.Navigation("Permissions");
 11800
 11801                    b.Navigation("Preferences");
 11802
 11803                    b.Navigation("ProfileImage");
 11804                });
 1805#pragma warning restore 612, 618
 11806        }
 1807    }
 1808}