20240928082930_MarkSegmentProviderIdNonNullable.Designer.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712
  1. // <auto-generated />
  2. using System;
  3. using Jellyfin.Server.Implementations;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace Jellyfin.Server.Implementations.Migrations
  10. {
  11. [DbContext(typeof(JellyfinDbContext))]
  12. [Migration("20240928082930_MarkSegmentProviderIdNonNullable")]
  13. partial class MarkSegmentProviderIdNonNullable
  14. {
  15. /// <inheritdoc />
  16. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  17. {
  18. #pragma warning disable 612, 618
  19. modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
  20. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  21. {
  22. b.Property<int>("Id")
  23. .ValueGeneratedOnAdd()
  24. .HasColumnType("INTEGER");
  25. b.Property<int>("DayOfWeek")
  26. .HasColumnType("INTEGER");
  27. b.Property<double>("EndHour")
  28. .HasColumnType("REAL");
  29. b.Property<double>("StartHour")
  30. .HasColumnType("REAL");
  31. b.Property<Guid>("UserId")
  32. .HasColumnType("TEXT");
  33. b.HasKey("Id");
  34. b.HasIndex("UserId");
  35. b.ToTable("AccessSchedules");
  36. });
  37. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  38. {
  39. b.Property<int>("Id")
  40. .ValueGeneratedOnAdd()
  41. .HasColumnType("INTEGER");
  42. b.Property<DateTime>("DateCreated")
  43. .HasColumnType("TEXT");
  44. b.Property<string>("ItemId")
  45. .HasMaxLength(256)
  46. .HasColumnType("TEXT");
  47. b.Property<int>("LogSeverity")
  48. .HasColumnType("INTEGER");
  49. b.Property<string>("Name")
  50. .IsRequired()
  51. .HasMaxLength(512)
  52. .HasColumnType("TEXT");
  53. b.Property<string>("Overview")
  54. .HasMaxLength(512)
  55. .HasColumnType("TEXT");
  56. b.Property<uint>("RowVersion")
  57. .IsConcurrencyToken()
  58. .HasColumnType("INTEGER");
  59. b.Property<string>("ShortOverview")
  60. .HasMaxLength(512)
  61. .HasColumnType("TEXT");
  62. b.Property<string>("Type")
  63. .IsRequired()
  64. .HasMaxLength(256)
  65. .HasColumnType("TEXT");
  66. b.Property<Guid>("UserId")
  67. .HasColumnType("TEXT");
  68. b.HasKey("Id");
  69. b.HasIndex("DateCreated");
  70. b.ToTable("ActivityLogs");
  71. });
  72. modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
  73. {
  74. b.Property<int>("Id")
  75. .ValueGeneratedOnAdd()
  76. .HasColumnType("INTEGER");
  77. b.Property<string>("Client")
  78. .IsRequired()
  79. .HasMaxLength(32)
  80. .HasColumnType("TEXT");
  81. b.Property<Guid>("ItemId")
  82. .HasColumnType("TEXT");
  83. b.Property<string>("Key")
  84. .IsRequired()
  85. .HasColumnType("TEXT");
  86. b.Property<Guid>("UserId")
  87. .HasColumnType("TEXT");
  88. b.Property<string>("Value")
  89. .HasColumnType("TEXT");
  90. b.HasKey("Id");
  91. b.HasIndex("UserId", "ItemId", "Client", "Key")
  92. .IsUnique();
  93. b.ToTable("CustomItemDisplayPreferences");
  94. });
  95. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  96. {
  97. b.Property<int>("Id")
  98. .ValueGeneratedOnAdd()
  99. .HasColumnType("INTEGER");
  100. b.Property<int>("ChromecastVersion")
  101. .HasColumnType("INTEGER");
  102. b.Property<string>("Client")
  103. .IsRequired()
  104. .HasMaxLength(32)
  105. .HasColumnType("TEXT");
  106. b.Property<string>("DashboardTheme")
  107. .HasMaxLength(32)
  108. .HasColumnType("TEXT");
  109. b.Property<bool>("EnableNextVideoInfoOverlay")
  110. .HasColumnType("INTEGER");
  111. b.Property<int?>("IndexBy")
  112. .HasColumnType("INTEGER");
  113. b.Property<Guid>("ItemId")
  114. .HasColumnType("TEXT");
  115. b.Property<int>("ScrollDirection")
  116. .HasColumnType("INTEGER");
  117. b.Property<bool>("ShowBackdrop")
  118. .HasColumnType("INTEGER");
  119. b.Property<bool>("ShowSidebar")
  120. .HasColumnType("INTEGER");
  121. b.Property<int>("SkipBackwardLength")
  122. .HasColumnType("INTEGER");
  123. b.Property<int>("SkipForwardLength")
  124. .HasColumnType("INTEGER");
  125. b.Property<string>("TvHome")
  126. .HasMaxLength(32)
  127. .HasColumnType("TEXT");
  128. b.Property<Guid>("UserId")
  129. .HasColumnType("TEXT");
  130. b.HasKey("Id");
  131. b.HasIndex("UserId", "ItemId", "Client")
  132. .IsUnique();
  133. b.ToTable("DisplayPreferences");
  134. });
  135. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  136. {
  137. b.Property<int>("Id")
  138. .ValueGeneratedOnAdd()
  139. .HasColumnType("INTEGER");
  140. b.Property<int>("DisplayPreferencesId")
  141. .HasColumnType("INTEGER");
  142. b.Property<int>("Order")
  143. .HasColumnType("INTEGER");
  144. b.Property<int>("Type")
  145. .HasColumnType("INTEGER");
  146. b.HasKey("Id");
  147. b.HasIndex("DisplayPreferencesId");
  148. b.ToTable("HomeSection");
  149. });
  150. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  151. {
  152. b.Property<int>("Id")
  153. .ValueGeneratedOnAdd()
  154. .HasColumnType("INTEGER");
  155. b.Property<DateTime>("LastModified")
  156. .HasColumnType("TEXT");
  157. b.Property<string>("Path")
  158. .IsRequired()
  159. .HasMaxLength(512)
  160. .HasColumnType("TEXT");
  161. b.Property<Guid?>("UserId")
  162. .HasColumnType("TEXT");
  163. b.HasKey("Id");
  164. b.HasIndex("UserId")
  165. .IsUnique();
  166. b.ToTable("ImageInfos");
  167. });
  168. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  169. {
  170. b.Property<int>("Id")
  171. .ValueGeneratedOnAdd()
  172. .HasColumnType("INTEGER");
  173. b.Property<string>("Client")
  174. .IsRequired()
  175. .HasMaxLength(32)
  176. .HasColumnType("TEXT");
  177. b.Property<int?>("IndexBy")
  178. .HasColumnType("INTEGER");
  179. b.Property<Guid>("ItemId")
  180. .HasColumnType("TEXT");
  181. b.Property<bool>("RememberIndexing")
  182. .HasColumnType("INTEGER");
  183. b.Property<bool>("RememberSorting")
  184. .HasColumnType("INTEGER");
  185. b.Property<string>("SortBy")
  186. .IsRequired()
  187. .HasMaxLength(64)
  188. .HasColumnType("TEXT");
  189. b.Property<int>("SortOrder")
  190. .HasColumnType("INTEGER");
  191. b.Property<Guid>("UserId")
  192. .HasColumnType("TEXT");
  193. b.Property<int>("ViewType")
  194. .HasColumnType("INTEGER");
  195. b.HasKey("Id");
  196. b.HasIndex("UserId");
  197. b.ToTable("ItemDisplayPreferences");
  198. });
  199. modelBuilder.Entity("Jellyfin.Data.Entities.MediaSegment", b =>
  200. {
  201. b.Property<Guid>("Id")
  202. .ValueGeneratedOnAdd()
  203. .HasColumnType("TEXT");
  204. b.Property<long>("EndTicks")
  205. .HasColumnType("INTEGER");
  206. b.Property<Guid>("ItemId")
  207. .HasColumnType("TEXT");
  208. b.Property<string>("SegmentProviderId")
  209. .IsRequired()
  210. .HasColumnType("TEXT");
  211. b.Property<long>("StartTicks")
  212. .HasColumnType("INTEGER");
  213. b.Property<int>("Type")
  214. .HasColumnType("INTEGER");
  215. b.HasKey("Id");
  216. b.ToTable("MediaSegments");
  217. });
  218. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  219. {
  220. b.Property<int>("Id")
  221. .ValueGeneratedOnAdd()
  222. .HasColumnType("INTEGER");
  223. b.Property<int>("Kind")
  224. .HasColumnType("INTEGER");
  225. b.Property<Guid?>("Permission_Permissions_Guid")
  226. .HasColumnType("TEXT");
  227. b.Property<uint>("RowVersion")
  228. .IsConcurrencyToken()
  229. .HasColumnType("INTEGER");
  230. b.Property<Guid?>("UserId")
  231. .HasColumnType("TEXT");
  232. b.Property<bool>("Value")
  233. .HasColumnType("INTEGER");
  234. b.HasKey("Id");
  235. b.HasIndex("UserId", "Kind")
  236. .IsUnique()
  237. .HasFilter("[UserId] IS NOT NULL");
  238. b.ToTable("Permissions");
  239. });
  240. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  241. {
  242. b.Property<int>("Id")
  243. .ValueGeneratedOnAdd()
  244. .HasColumnType("INTEGER");
  245. b.Property<int>("Kind")
  246. .HasColumnType("INTEGER");
  247. b.Property<Guid?>("Preference_Preferences_Guid")
  248. .HasColumnType("TEXT");
  249. b.Property<uint>("RowVersion")
  250. .IsConcurrencyToken()
  251. .HasColumnType("INTEGER");
  252. b.Property<Guid?>("UserId")
  253. .HasColumnType("TEXT");
  254. b.Property<string>("Value")
  255. .IsRequired()
  256. .HasMaxLength(65535)
  257. .HasColumnType("TEXT");
  258. b.HasKey("Id");
  259. b.HasIndex("UserId", "Kind")
  260. .IsUnique()
  261. .HasFilter("[UserId] IS NOT NULL");
  262. b.ToTable("Preferences");
  263. });
  264. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  265. {
  266. b.Property<int>("Id")
  267. .ValueGeneratedOnAdd()
  268. .HasColumnType("INTEGER");
  269. b.Property<string>("AccessToken")
  270. .IsRequired()
  271. .HasColumnType("TEXT");
  272. b.Property<DateTime>("DateCreated")
  273. .HasColumnType("TEXT");
  274. b.Property<DateTime>("DateLastActivity")
  275. .HasColumnType("TEXT");
  276. b.Property<string>("Name")
  277. .IsRequired()
  278. .HasMaxLength(64)
  279. .HasColumnType("TEXT");
  280. b.HasKey("Id");
  281. b.HasIndex("AccessToken")
  282. .IsUnique();
  283. b.ToTable("ApiKeys");
  284. });
  285. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  286. {
  287. b.Property<int>("Id")
  288. .ValueGeneratedOnAdd()
  289. .HasColumnType("INTEGER");
  290. b.Property<string>("AccessToken")
  291. .IsRequired()
  292. .HasColumnType("TEXT");
  293. b.Property<string>("AppName")
  294. .IsRequired()
  295. .HasMaxLength(64)
  296. .HasColumnType("TEXT");
  297. b.Property<string>("AppVersion")
  298. .IsRequired()
  299. .HasMaxLength(32)
  300. .HasColumnType("TEXT");
  301. b.Property<DateTime>("DateCreated")
  302. .HasColumnType("TEXT");
  303. b.Property<DateTime>("DateLastActivity")
  304. .HasColumnType("TEXT");
  305. b.Property<DateTime>("DateModified")
  306. .HasColumnType("TEXT");
  307. b.Property<string>("DeviceId")
  308. .IsRequired()
  309. .HasMaxLength(256)
  310. .HasColumnType("TEXT");
  311. b.Property<string>("DeviceName")
  312. .IsRequired()
  313. .HasMaxLength(64)
  314. .HasColumnType("TEXT");
  315. b.Property<bool>("IsActive")
  316. .HasColumnType("INTEGER");
  317. b.Property<Guid>("UserId")
  318. .HasColumnType("TEXT");
  319. b.HasKey("Id");
  320. b.HasIndex("DeviceId");
  321. b.HasIndex("AccessToken", "DateLastActivity");
  322. b.HasIndex("DeviceId", "DateLastActivity");
  323. b.HasIndex("UserId", "DeviceId");
  324. b.ToTable("Devices");
  325. });
  326. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  327. {
  328. b.Property<int>("Id")
  329. .ValueGeneratedOnAdd()
  330. .HasColumnType("INTEGER");
  331. b.Property<string>("CustomName")
  332. .HasColumnType("TEXT");
  333. b.Property<string>("DeviceId")
  334. .IsRequired()
  335. .HasColumnType("TEXT");
  336. b.HasKey("Id");
  337. b.HasIndex("DeviceId")
  338. .IsUnique();
  339. b.ToTable("DeviceOptions");
  340. });
  341. modelBuilder.Entity("Jellyfin.Data.Entities.TrickplayInfo", b =>
  342. {
  343. b.Property<Guid>("ItemId")
  344. .HasColumnType("TEXT");
  345. b.Property<int>("Width")
  346. .HasColumnType("INTEGER");
  347. b.Property<int>("Bandwidth")
  348. .HasColumnType("INTEGER");
  349. b.Property<int>("Height")
  350. .HasColumnType("INTEGER");
  351. b.Property<int>("Interval")
  352. .HasColumnType("INTEGER");
  353. b.Property<int>("ThumbnailCount")
  354. .HasColumnType("INTEGER");
  355. b.Property<int>("TileHeight")
  356. .HasColumnType("INTEGER");
  357. b.Property<int>("TileWidth")
  358. .HasColumnType("INTEGER");
  359. b.HasKey("ItemId", "Width");
  360. b.ToTable("TrickplayInfos");
  361. });
  362. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  363. {
  364. b.Property<Guid>("Id")
  365. .ValueGeneratedOnAdd()
  366. .HasColumnType("TEXT");
  367. b.Property<string>("AudioLanguagePreference")
  368. .HasMaxLength(255)
  369. .HasColumnType("TEXT");
  370. b.Property<string>("AuthenticationProviderId")
  371. .IsRequired()
  372. .HasMaxLength(255)
  373. .HasColumnType("TEXT");
  374. b.Property<string>("CastReceiverId")
  375. .HasMaxLength(32)
  376. .HasColumnType("TEXT");
  377. b.Property<bool>("DisplayCollectionsView")
  378. .HasColumnType("INTEGER");
  379. b.Property<bool>("DisplayMissingEpisodes")
  380. .HasColumnType("INTEGER");
  381. b.Property<bool>("EnableAutoLogin")
  382. .HasColumnType("INTEGER");
  383. b.Property<bool>("EnableLocalPassword")
  384. .HasColumnType("INTEGER");
  385. b.Property<bool>("EnableNextEpisodeAutoPlay")
  386. .HasColumnType("INTEGER");
  387. b.Property<bool>("EnableUserPreferenceAccess")
  388. .HasColumnType("INTEGER");
  389. b.Property<bool>("HidePlayedInLatest")
  390. .HasColumnType("INTEGER");
  391. b.Property<long>("InternalId")
  392. .HasColumnType("INTEGER");
  393. b.Property<int>("InvalidLoginAttemptCount")
  394. .HasColumnType("INTEGER");
  395. b.Property<DateTime?>("LastActivityDate")
  396. .HasColumnType("TEXT");
  397. b.Property<DateTime?>("LastLoginDate")
  398. .HasColumnType("TEXT");
  399. b.Property<int?>("LoginAttemptsBeforeLockout")
  400. .HasColumnType("INTEGER");
  401. b.Property<int>("MaxActiveSessions")
  402. .HasColumnType("INTEGER");
  403. b.Property<int?>("MaxParentalAgeRating")
  404. .HasColumnType("INTEGER");
  405. b.Property<bool>("MustUpdatePassword")
  406. .HasColumnType("INTEGER");
  407. b.Property<string>("Password")
  408. .HasMaxLength(65535)
  409. .HasColumnType("TEXT");
  410. b.Property<string>("PasswordResetProviderId")
  411. .IsRequired()
  412. .HasMaxLength(255)
  413. .HasColumnType("TEXT");
  414. b.Property<bool>("PlayDefaultAudioTrack")
  415. .HasColumnType("INTEGER");
  416. b.Property<bool>("RememberAudioSelections")
  417. .HasColumnType("INTEGER");
  418. b.Property<bool>("RememberSubtitleSelections")
  419. .HasColumnType("INTEGER");
  420. b.Property<int?>("RemoteClientBitrateLimit")
  421. .HasColumnType("INTEGER");
  422. b.Property<uint>("RowVersion")
  423. .IsConcurrencyToken()
  424. .HasColumnType("INTEGER");
  425. b.Property<string>("SubtitleLanguagePreference")
  426. .HasMaxLength(255)
  427. .HasColumnType("TEXT");
  428. b.Property<int>("SubtitleMode")
  429. .HasColumnType("INTEGER");
  430. b.Property<int>("SyncPlayAccess")
  431. .HasColumnType("INTEGER");
  432. b.Property<string>("Username")
  433. .IsRequired()
  434. .HasMaxLength(255)
  435. .HasColumnType("TEXT")
  436. .UseCollation("NOCASE");
  437. b.HasKey("Id");
  438. b.HasIndex("Username")
  439. .IsUnique();
  440. b.ToTable("Users");
  441. });
  442. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  443. {
  444. b.HasOne("Jellyfin.Data.Entities.User", null)
  445. .WithMany("AccessSchedules")
  446. .HasForeignKey("UserId")
  447. .OnDelete(DeleteBehavior.Cascade)
  448. .IsRequired();
  449. });
  450. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  451. {
  452. b.HasOne("Jellyfin.Data.Entities.User", null)
  453. .WithMany("DisplayPreferences")
  454. .HasForeignKey("UserId")
  455. .OnDelete(DeleteBehavior.Cascade)
  456. .IsRequired();
  457. });
  458. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  459. {
  460. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  461. .WithMany("HomeSections")
  462. .HasForeignKey("DisplayPreferencesId")
  463. .OnDelete(DeleteBehavior.Cascade)
  464. .IsRequired();
  465. });
  466. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  467. {
  468. b.HasOne("Jellyfin.Data.Entities.User", null)
  469. .WithOne("ProfileImage")
  470. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  471. .OnDelete(DeleteBehavior.Cascade);
  472. });
  473. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  474. {
  475. b.HasOne("Jellyfin.Data.Entities.User", null)
  476. .WithMany("ItemDisplayPreferences")
  477. .HasForeignKey("UserId")
  478. .OnDelete(DeleteBehavior.Cascade)
  479. .IsRequired();
  480. });
  481. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  482. {
  483. b.HasOne("Jellyfin.Data.Entities.User", null)
  484. .WithMany("Permissions")
  485. .HasForeignKey("UserId")
  486. .OnDelete(DeleteBehavior.Cascade);
  487. });
  488. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  489. {
  490. b.HasOne("Jellyfin.Data.Entities.User", null)
  491. .WithMany("Preferences")
  492. .HasForeignKey("UserId")
  493. .OnDelete(DeleteBehavior.Cascade);
  494. });
  495. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  496. {
  497. b.HasOne("Jellyfin.Data.Entities.User", "User")
  498. .WithMany()
  499. .HasForeignKey("UserId")
  500. .OnDelete(DeleteBehavior.Cascade)
  501. .IsRequired();
  502. b.Navigation("User");
  503. });
  504. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  505. {
  506. b.Navigation("HomeSections");
  507. });
  508. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  509. {
  510. b.Navigation("AccessSchedules");
  511. b.Navigation("DisplayPreferences");
  512. b.Navigation("ItemDisplayPreferences");
  513. b.Navigation("Permissions");
  514. b.Navigation("Preferences");
  515. b.Navigation("ProfileImage");
  516. });
  517. #pragma warning restore 612, 618
  518. }
  519. }
  520. }