20210814002109_AddDevices.Designer.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. #pragma warning disable CS1591
  2. // <auto-generated />
  3. using System;
  4. using Jellyfin.Server.Implementations;
  5. using Microsoft.EntityFrameworkCore;
  6. using Microsoft.EntityFrameworkCore.Infrastructure;
  7. using Microsoft.EntityFrameworkCore.Migrations;
  8. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  9. namespace Jellyfin.Server.Implementations.Migrations
  10. {
  11. [DbContext(typeof(JellyfinDbContext))]
  12. [Migration("20210814002109_AddDevices")]
  13. partial class AddDevices
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasDefaultSchema("jellyfin")
  20. .HasAnnotation("ProductVersion", "5.0.7");
  21. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  22. {
  23. b.Property<int>("Id")
  24. .ValueGeneratedOnAdd()
  25. .HasColumnType("INTEGER");
  26. b.Property<int>("DayOfWeek")
  27. .HasColumnType("INTEGER");
  28. b.Property<double>("EndHour")
  29. .HasColumnType("REAL");
  30. b.Property<double>("StartHour")
  31. .HasColumnType("REAL");
  32. b.Property<Guid>("UserId")
  33. .HasColumnType("TEXT");
  34. b.HasKey("Id");
  35. b.HasIndex("UserId");
  36. b.ToTable("AccessSchedules");
  37. });
  38. modelBuilder.Entity("Jellyfin.Data.Entities.ActivityLog", b =>
  39. {
  40. b.Property<int>("Id")
  41. .ValueGeneratedOnAdd()
  42. .HasColumnType("INTEGER");
  43. b.Property<DateTime>("DateCreated")
  44. .HasColumnType("TEXT");
  45. b.Property<string>("ItemId")
  46. .HasMaxLength(256)
  47. .HasColumnType("TEXT");
  48. b.Property<int>("LogSeverity")
  49. .HasColumnType("INTEGER");
  50. b.Property<string>("Name")
  51. .IsRequired()
  52. .HasMaxLength(512)
  53. .HasColumnType("TEXT");
  54. b.Property<string>("Overview")
  55. .HasMaxLength(512)
  56. .HasColumnType("TEXT");
  57. b.Property<uint>("RowVersion")
  58. .IsConcurrencyToken()
  59. .HasColumnType("INTEGER");
  60. b.Property<string>("ShortOverview")
  61. .HasMaxLength(512)
  62. .HasColumnType("TEXT");
  63. b.Property<string>("Type")
  64. .IsRequired()
  65. .HasMaxLength(256)
  66. .HasColumnType("TEXT");
  67. b.Property<Guid>("UserId")
  68. .HasColumnType("TEXT");
  69. b.HasKey("Id");
  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.Permission", b =>
  200. {
  201. b.Property<int>("Id")
  202. .ValueGeneratedOnAdd()
  203. .HasColumnType("INTEGER");
  204. b.Property<int>("Kind")
  205. .HasColumnType("INTEGER");
  206. b.Property<Guid?>("Permission_Permissions_Guid")
  207. .HasColumnType("TEXT");
  208. b.Property<uint>("RowVersion")
  209. .IsConcurrencyToken()
  210. .HasColumnType("INTEGER");
  211. b.Property<Guid?>("UserId")
  212. .HasColumnType("TEXT");
  213. b.Property<bool>("Value")
  214. .HasColumnType("INTEGER");
  215. b.HasKey("Id");
  216. b.HasIndex("UserId", "Kind")
  217. .IsUnique()
  218. .HasFilter("[UserId] IS NOT NULL");
  219. b.ToTable("Permissions");
  220. });
  221. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  222. {
  223. b.Property<int>("Id")
  224. .ValueGeneratedOnAdd()
  225. .HasColumnType("INTEGER");
  226. b.Property<int>("Kind")
  227. .HasColumnType("INTEGER");
  228. b.Property<Guid?>("Preference_Preferences_Guid")
  229. .HasColumnType("TEXT");
  230. b.Property<uint>("RowVersion")
  231. .IsConcurrencyToken()
  232. .HasColumnType("INTEGER");
  233. b.Property<Guid?>("UserId")
  234. .HasColumnType("TEXT");
  235. b.Property<string>("Value")
  236. .IsRequired()
  237. .HasMaxLength(65535)
  238. .HasColumnType("TEXT");
  239. b.HasKey("Id");
  240. b.HasIndex("UserId", "Kind")
  241. .IsUnique()
  242. .HasFilter("[UserId] IS NOT NULL");
  243. b.ToTable("Preferences");
  244. });
  245. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  246. {
  247. b.Property<int>("Id")
  248. .ValueGeneratedOnAdd()
  249. .HasColumnType("INTEGER");
  250. b.Property<string>("AccessToken")
  251. .IsRequired()
  252. .HasColumnType("TEXT");
  253. b.Property<DateTime>("DateCreated")
  254. .HasColumnType("TEXT");
  255. b.Property<DateTime>("DateLastActivity")
  256. .HasColumnType("TEXT");
  257. b.Property<string>("Name")
  258. .IsRequired()
  259. .HasMaxLength(64)
  260. .HasColumnType("TEXT");
  261. b.HasKey("Id");
  262. b.HasIndex("AccessToken")
  263. .IsUnique();
  264. b.ToTable("ApiKeys");
  265. });
  266. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  267. {
  268. b.Property<int>("Id")
  269. .ValueGeneratedOnAdd()
  270. .HasColumnType("INTEGER");
  271. b.Property<string>("AccessToken")
  272. .IsRequired()
  273. .HasColumnType("TEXT");
  274. b.Property<string>("AppName")
  275. .IsRequired()
  276. .HasMaxLength(64)
  277. .HasColumnType("TEXT");
  278. b.Property<string>("AppVersion")
  279. .IsRequired()
  280. .HasMaxLength(32)
  281. .HasColumnType("TEXT");
  282. b.Property<DateTime>("DateCreated")
  283. .HasColumnType("TEXT");
  284. b.Property<DateTime>("DateLastActivity")
  285. .HasColumnType("TEXT");
  286. b.Property<DateTime>("DateModified")
  287. .HasColumnType("TEXT");
  288. b.Property<string>("DeviceId")
  289. .IsRequired()
  290. .HasMaxLength(256)
  291. .HasColumnType("TEXT");
  292. b.Property<string>("DeviceName")
  293. .IsRequired()
  294. .HasMaxLength(64)
  295. .HasColumnType("TEXT");
  296. b.Property<bool>("IsActive")
  297. .HasColumnType("INTEGER");
  298. b.Property<Guid>("UserId")
  299. .HasColumnType("TEXT");
  300. b.HasKey("Id");
  301. b.HasIndex("DeviceId");
  302. b.HasIndex("AccessToken", "DateLastActivity");
  303. b.HasIndex("DeviceId", "DateLastActivity");
  304. b.HasIndex("UserId", "DeviceId");
  305. b.ToTable("Devices");
  306. });
  307. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  308. {
  309. b.Property<int>("Id")
  310. .ValueGeneratedOnAdd()
  311. .HasColumnType("INTEGER");
  312. b.Property<string>("CustomName")
  313. .HasColumnType("TEXT");
  314. b.Property<string>("DeviceId")
  315. .IsRequired()
  316. .HasColumnType("TEXT");
  317. b.HasKey("Id");
  318. b.HasIndex("DeviceId")
  319. .IsUnique();
  320. b.ToTable("DeviceOptions");
  321. });
  322. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  323. {
  324. b.Property<Guid>("Id")
  325. .ValueGeneratedOnAdd()
  326. .HasColumnType("TEXT");
  327. b.Property<string>("AudioLanguagePreference")
  328. .HasMaxLength(255)
  329. .HasColumnType("TEXT");
  330. b.Property<string>("AuthenticationProviderId")
  331. .IsRequired()
  332. .HasMaxLength(255)
  333. .HasColumnType("TEXT");
  334. b.Property<bool>("DisplayCollectionsView")
  335. .HasColumnType("INTEGER");
  336. b.Property<bool>("DisplayMissingEpisodes")
  337. .HasColumnType("INTEGER");
  338. b.Property<string>("EasyPassword")
  339. .HasMaxLength(65535)
  340. .HasColumnType("TEXT");
  341. b.Property<bool>("EnableAutoLogin")
  342. .HasColumnType("INTEGER");
  343. b.Property<bool>("EnableLocalPassword")
  344. .HasColumnType("INTEGER");
  345. b.Property<bool>("EnableNextEpisodeAutoPlay")
  346. .HasColumnType("INTEGER");
  347. b.Property<bool>("EnableUserPreferenceAccess")
  348. .HasColumnType("INTEGER");
  349. b.Property<bool>("HidePlayedInLatest")
  350. .HasColumnType("INTEGER");
  351. b.Property<long>("InternalId")
  352. .HasColumnType("INTEGER");
  353. b.Property<int>("InvalidLoginAttemptCount")
  354. .HasColumnType("INTEGER");
  355. b.Property<DateTime?>("LastActivityDate")
  356. .HasColumnType("TEXT");
  357. b.Property<DateTime?>("LastLoginDate")
  358. .HasColumnType("TEXT");
  359. b.Property<int?>("LoginAttemptsBeforeLockout")
  360. .HasColumnType("INTEGER");
  361. b.Property<int>("MaxActiveSessions")
  362. .HasColumnType("INTEGER");
  363. b.Property<int?>("MaxParentalAgeRating")
  364. .HasColumnType("INTEGER");
  365. b.Property<bool>("MustUpdatePassword")
  366. .HasColumnType("INTEGER");
  367. b.Property<string>("Password")
  368. .HasMaxLength(65535)
  369. .HasColumnType("TEXT");
  370. b.Property<string>("PasswordResetProviderId")
  371. .IsRequired()
  372. .HasMaxLength(255)
  373. .HasColumnType("TEXT");
  374. b.Property<bool>("PlayDefaultAudioTrack")
  375. .HasColumnType("INTEGER");
  376. b.Property<bool>("RememberAudioSelections")
  377. .HasColumnType("INTEGER");
  378. b.Property<bool>("RememberSubtitleSelections")
  379. .HasColumnType("INTEGER");
  380. b.Property<int?>("RemoteClientBitrateLimit")
  381. .HasColumnType("INTEGER");
  382. b.Property<uint>("RowVersion")
  383. .IsConcurrencyToken()
  384. .HasColumnType("INTEGER");
  385. b.Property<string>("SubtitleLanguagePreference")
  386. .HasMaxLength(255)
  387. .HasColumnType("TEXT");
  388. b.Property<int>("SubtitleMode")
  389. .HasColumnType("INTEGER");
  390. b.Property<int>("SyncPlayAccess")
  391. .HasColumnType("INTEGER");
  392. b.Property<string>("Username")
  393. .IsRequired()
  394. .HasMaxLength(255)
  395. .HasColumnType("TEXT")
  396. .UseCollation("NOCASE");
  397. b.HasKey("Id");
  398. b.HasIndex("Username")
  399. .IsUnique();
  400. b.ToTable("Users");
  401. });
  402. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  403. {
  404. b.HasOne("Jellyfin.Data.Entities.User", null)
  405. .WithMany("AccessSchedules")
  406. .HasForeignKey("UserId")
  407. .OnDelete(DeleteBehavior.Cascade)
  408. .IsRequired();
  409. });
  410. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  411. {
  412. b.HasOne("Jellyfin.Data.Entities.User", null)
  413. .WithMany("DisplayPreferences")
  414. .HasForeignKey("UserId")
  415. .OnDelete(DeleteBehavior.Cascade)
  416. .IsRequired();
  417. });
  418. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  419. {
  420. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  421. .WithMany("HomeSections")
  422. .HasForeignKey("DisplayPreferencesId")
  423. .OnDelete(DeleteBehavior.Cascade)
  424. .IsRequired();
  425. });
  426. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  427. {
  428. b.HasOne("Jellyfin.Data.Entities.User", null)
  429. .WithOne("ProfileImage")
  430. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  431. .OnDelete(DeleteBehavior.Cascade);
  432. });
  433. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  434. {
  435. b.HasOne("Jellyfin.Data.Entities.User", null)
  436. .WithMany("ItemDisplayPreferences")
  437. .HasForeignKey("UserId")
  438. .OnDelete(DeleteBehavior.Cascade)
  439. .IsRequired();
  440. });
  441. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  442. {
  443. b.HasOne("Jellyfin.Data.Entities.User", null)
  444. .WithMany("Permissions")
  445. .HasForeignKey("UserId")
  446. .OnDelete(DeleteBehavior.Cascade);
  447. });
  448. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  449. {
  450. b.HasOne("Jellyfin.Data.Entities.User", null)
  451. .WithMany("Preferences")
  452. .HasForeignKey("UserId")
  453. .OnDelete(DeleteBehavior.Cascade);
  454. });
  455. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  456. {
  457. b.HasOne("Jellyfin.Data.Entities.User", "User")
  458. .WithMany()
  459. .HasForeignKey("UserId")
  460. .OnDelete(DeleteBehavior.Cascade)
  461. .IsRequired();
  462. b.Navigation("User");
  463. });
  464. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  465. {
  466. b.Navigation("HomeSections");
  467. });
  468. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  469. {
  470. b.Navigation("AccessSchedules");
  471. b.Navigation("DisplayPreferences");
  472. b.Navigation("ItemDisplayPreferences");
  473. b.Navigation("Permissions");
  474. b.Navigation("Preferences");
  475. b.Navigation("ProfileImage");
  476. });
  477. #pragma warning restore 612, 618
  478. }
  479. }
  480. }