20221022080052_AddIndexActivityLogsDateCreated.Designer.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655
  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(JellyfinDb))]
  12. [Migration("20221022080052_AddIndexActivityLogsDateCreated")]
  13. partial class AddIndexActivityLogsDateCreated
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder
  19. .HasDefaultSchema("jellyfin")
  20. .HasAnnotation("ProductVersion", "6.0.9");
  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", "jellyfin");
  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.HasIndex("DateCreated");
  71. b.ToTable("ActivityLogs", "jellyfin");
  72. });
  73. modelBuilder.Entity("Jellyfin.Data.Entities.CustomItemDisplayPreferences", b =>
  74. {
  75. b.Property<int>("Id")
  76. .ValueGeneratedOnAdd()
  77. .HasColumnType("INTEGER");
  78. b.Property<string>("Client")
  79. .IsRequired()
  80. .HasMaxLength(32)
  81. .HasColumnType("TEXT");
  82. b.Property<Guid>("ItemId")
  83. .HasColumnType("TEXT");
  84. b.Property<string>("Key")
  85. .IsRequired()
  86. .HasColumnType("TEXT");
  87. b.Property<Guid>("UserId")
  88. .HasColumnType("TEXT");
  89. b.Property<string>("Value")
  90. .HasColumnType("TEXT");
  91. b.HasKey("Id");
  92. b.HasIndex("UserId", "ItemId", "Client", "Key")
  93. .IsUnique();
  94. b.ToTable("CustomItemDisplayPreferences", "jellyfin");
  95. });
  96. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  97. {
  98. b.Property<int>("Id")
  99. .ValueGeneratedOnAdd()
  100. .HasColumnType("INTEGER");
  101. b.Property<int>("ChromecastVersion")
  102. .HasColumnType("INTEGER");
  103. b.Property<string>("Client")
  104. .IsRequired()
  105. .HasMaxLength(32)
  106. .HasColumnType("TEXT");
  107. b.Property<string>("DashboardTheme")
  108. .HasMaxLength(32)
  109. .HasColumnType("TEXT");
  110. b.Property<bool>("EnableNextVideoInfoOverlay")
  111. .HasColumnType("INTEGER");
  112. b.Property<int?>("IndexBy")
  113. .HasColumnType("INTEGER");
  114. b.Property<Guid>("ItemId")
  115. .HasColumnType("TEXT");
  116. b.Property<int>("ScrollDirection")
  117. .HasColumnType("INTEGER");
  118. b.Property<bool>("ShowBackdrop")
  119. .HasColumnType("INTEGER");
  120. b.Property<bool>("ShowSidebar")
  121. .HasColumnType("INTEGER");
  122. b.Property<int>("SkipBackwardLength")
  123. .HasColumnType("INTEGER");
  124. b.Property<int>("SkipForwardLength")
  125. .HasColumnType("INTEGER");
  126. b.Property<string>("TvHome")
  127. .HasMaxLength(32)
  128. .HasColumnType("TEXT");
  129. b.Property<Guid>("UserId")
  130. .HasColumnType("TEXT");
  131. b.HasKey("Id");
  132. b.HasIndex("UserId", "ItemId", "Client")
  133. .IsUnique();
  134. b.ToTable("DisplayPreferences", "jellyfin");
  135. });
  136. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  137. {
  138. b.Property<int>("Id")
  139. .ValueGeneratedOnAdd()
  140. .HasColumnType("INTEGER");
  141. b.Property<int>("DisplayPreferencesId")
  142. .HasColumnType("INTEGER");
  143. b.Property<int>("Order")
  144. .HasColumnType("INTEGER");
  145. b.Property<int>("Type")
  146. .HasColumnType("INTEGER");
  147. b.HasKey("Id");
  148. b.HasIndex("DisplayPreferencesId");
  149. b.ToTable("HomeSection", "jellyfin");
  150. });
  151. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  152. {
  153. b.Property<int>("Id")
  154. .ValueGeneratedOnAdd()
  155. .HasColumnType("INTEGER");
  156. b.Property<DateTime>("LastModified")
  157. .HasColumnType("TEXT");
  158. b.Property<string>("Path")
  159. .IsRequired()
  160. .HasMaxLength(512)
  161. .HasColumnType("TEXT");
  162. b.Property<Guid?>("UserId")
  163. .HasColumnType("TEXT");
  164. b.HasKey("Id");
  165. b.HasIndex("UserId")
  166. .IsUnique();
  167. b.ToTable("ImageInfos", "jellyfin");
  168. });
  169. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  170. {
  171. b.Property<int>("Id")
  172. .ValueGeneratedOnAdd()
  173. .HasColumnType("INTEGER");
  174. b.Property<string>("Client")
  175. .IsRequired()
  176. .HasMaxLength(32)
  177. .HasColumnType("TEXT");
  178. b.Property<int?>("IndexBy")
  179. .HasColumnType("INTEGER");
  180. b.Property<Guid>("ItemId")
  181. .HasColumnType("TEXT");
  182. b.Property<bool>("RememberIndexing")
  183. .HasColumnType("INTEGER");
  184. b.Property<bool>("RememberSorting")
  185. .HasColumnType("INTEGER");
  186. b.Property<string>("SortBy")
  187. .IsRequired()
  188. .HasMaxLength(64)
  189. .HasColumnType("TEXT");
  190. b.Property<int>("SortOrder")
  191. .HasColumnType("INTEGER");
  192. b.Property<Guid>("UserId")
  193. .HasColumnType("TEXT");
  194. b.Property<int>("ViewType")
  195. .HasColumnType("INTEGER");
  196. b.HasKey("Id");
  197. b.HasIndex("UserId");
  198. b.ToTable("ItemDisplayPreferences", "jellyfin");
  199. });
  200. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  201. {
  202. b.Property<int>("Id")
  203. .ValueGeneratedOnAdd()
  204. .HasColumnType("INTEGER");
  205. b.Property<int>("Kind")
  206. .HasColumnType("INTEGER");
  207. b.Property<Guid?>("Permission_Permissions_Guid")
  208. .HasColumnType("TEXT");
  209. b.Property<uint>("RowVersion")
  210. .IsConcurrencyToken()
  211. .HasColumnType("INTEGER");
  212. b.Property<Guid?>("UserId")
  213. .HasColumnType("TEXT");
  214. b.Property<bool>("Value")
  215. .HasColumnType("INTEGER");
  216. b.HasKey("Id");
  217. b.HasIndex("UserId", "Kind")
  218. .IsUnique()
  219. .HasFilter("[UserId] IS NOT NULL");
  220. b.ToTable("Permissions", "jellyfin");
  221. });
  222. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  223. {
  224. b.Property<int>("Id")
  225. .ValueGeneratedOnAdd()
  226. .HasColumnType("INTEGER");
  227. b.Property<int>("Kind")
  228. .HasColumnType("INTEGER");
  229. b.Property<Guid?>("Preference_Preferences_Guid")
  230. .HasColumnType("TEXT");
  231. b.Property<uint>("RowVersion")
  232. .IsConcurrencyToken()
  233. .HasColumnType("INTEGER");
  234. b.Property<Guid?>("UserId")
  235. .HasColumnType("TEXT");
  236. b.Property<string>("Value")
  237. .IsRequired()
  238. .HasMaxLength(65535)
  239. .HasColumnType("TEXT");
  240. b.HasKey("Id");
  241. b.HasIndex("UserId", "Kind")
  242. .IsUnique()
  243. .HasFilter("[UserId] IS NOT NULL");
  244. b.ToTable("Preferences", "jellyfin");
  245. });
  246. modelBuilder.Entity("Jellyfin.Data.Entities.Security.ApiKey", b =>
  247. {
  248. b.Property<int>("Id")
  249. .ValueGeneratedOnAdd()
  250. .HasColumnType("INTEGER");
  251. b.Property<string>("AccessToken")
  252. .IsRequired()
  253. .HasColumnType("TEXT");
  254. b.Property<DateTime>("DateCreated")
  255. .HasColumnType("TEXT");
  256. b.Property<DateTime>("DateLastActivity")
  257. .HasColumnType("TEXT");
  258. b.Property<string>("Name")
  259. .IsRequired()
  260. .HasMaxLength(64)
  261. .HasColumnType("TEXT");
  262. b.HasKey("Id");
  263. b.HasIndex("AccessToken")
  264. .IsUnique();
  265. b.ToTable("ApiKeys", "jellyfin");
  266. });
  267. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  268. {
  269. b.Property<int>("Id")
  270. .ValueGeneratedOnAdd()
  271. .HasColumnType("INTEGER");
  272. b.Property<string>("AccessToken")
  273. .IsRequired()
  274. .HasColumnType("TEXT");
  275. b.Property<string>("AppName")
  276. .IsRequired()
  277. .HasMaxLength(64)
  278. .HasColumnType("TEXT");
  279. b.Property<string>("AppVersion")
  280. .IsRequired()
  281. .HasMaxLength(32)
  282. .HasColumnType("TEXT");
  283. b.Property<DateTime>("DateCreated")
  284. .HasColumnType("TEXT");
  285. b.Property<DateTime>("DateLastActivity")
  286. .HasColumnType("TEXT");
  287. b.Property<DateTime>("DateModified")
  288. .HasColumnType("TEXT");
  289. b.Property<string>("DeviceId")
  290. .IsRequired()
  291. .HasMaxLength(256)
  292. .HasColumnType("TEXT");
  293. b.Property<string>("DeviceName")
  294. .IsRequired()
  295. .HasMaxLength(64)
  296. .HasColumnType("TEXT");
  297. b.Property<bool>("IsActive")
  298. .HasColumnType("INTEGER");
  299. b.Property<Guid>("UserId")
  300. .HasColumnType("TEXT");
  301. b.HasKey("Id");
  302. b.HasIndex("DeviceId");
  303. b.HasIndex("AccessToken", "DateLastActivity");
  304. b.HasIndex("DeviceId", "DateLastActivity");
  305. b.HasIndex("UserId", "DeviceId");
  306. b.ToTable("Devices", "jellyfin");
  307. });
  308. modelBuilder.Entity("Jellyfin.Data.Entities.Security.DeviceOptions", b =>
  309. {
  310. b.Property<int>("Id")
  311. .ValueGeneratedOnAdd()
  312. .HasColumnType("INTEGER");
  313. b.Property<string>("CustomName")
  314. .HasColumnType("TEXT");
  315. b.Property<string>("DeviceId")
  316. .IsRequired()
  317. .HasColumnType("TEXT");
  318. b.HasKey("Id");
  319. b.HasIndex("DeviceId")
  320. .IsUnique();
  321. b.ToTable("DeviceOptions", "jellyfin");
  322. });
  323. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  324. {
  325. b.Property<Guid>("Id")
  326. .ValueGeneratedOnAdd()
  327. .HasColumnType("TEXT");
  328. b.Property<string>("AudioLanguagePreference")
  329. .HasMaxLength(255)
  330. .HasColumnType("TEXT");
  331. b.Property<string>("AuthenticationProviderId")
  332. .IsRequired()
  333. .HasMaxLength(255)
  334. .HasColumnType("TEXT");
  335. b.Property<bool>("DisplayCollectionsView")
  336. .HasColumnType("INTEGER");
  337. b.Property<bool>("DisplayMissingEpisodes")
  338. .HasColumnType("INTEGER");
  339. b.Property<string>("EasyPassword")
  340. .HasMaxLength(65535)
  341. .HasColumnType("TEXT");
  342. b.Property<bool>("EnableAutoLogin")
  343. .HasColumnType("INTEGER");
  344. b.Property<bool>("EnableLocalPassword")
  345. .HasColumnType("INTEGER");
  346. b.Property<bool>("EnableNextEpisodeAutoPlay")
  347. .HasColumnType("INTEGER");
  348. b.Property<bool>("EnableUserPreferenceAccess")
  349. .HasColumnType("INTEGER");
  350. b.Property<bool>("HidePlayedInLatest")
  351. .HasColumnType("INTEGER");
  352. b.Property<long>("InternalId")
  353. .HasColumnType("INTEGER");
  354. b.Property<int>("InvalidLoginAttemptCount")
  355. .HasColumnType("INTEGER");
  356. b.Property<DateTime?>("LastActivityDate")
  357. .HasColumnType("TEXT");
  358. b.Property<DateTime?>("LastLoginDate")
  359. .HasColumnType("TEXT");
  360. b.Property<int?>("LoginAttemptsBeforeLockout")
  361. .HasColumnType("INTEGER");
  362. b.Property<int>("MaxActiveSessions")
  363. .HasColumnType("INTEGER");
  364. b.Property<int?>("MaxParentalAgeRating")
  365. .HasColumnType("INTEGER");
  366. b.Property<bool>("MustUpdatePassword")
  367. .HasColumnType("INTEGER");
  368. b.Property<string>("Password")
  369. .HasMaxLength(65535)
  370. .HasColumnType("TEXT");
  371. b.Property<string>("PasswordResetProviderId")
  372. .IsRequired()
  373. .HasMaxLength(255)
  374. .HasColumnType("TEXT");
  375. b.Property<bool>("PlayDefaultAudioTrack")
  376. .HasColumnType("INTEGER");
  377. b.Property<bool>("RememberAudioSelections")
  378. .HasColumnType("INTEGER");
  379. b.Property<bool>("RememberSubtitleSelections")
  380. .HasColumnType("INTEGER");
  381. b.Property<int?>("RemoteClientBitrateLimit")
  382. .HasColumnType("INTEGER");
  383. b.Property<uint>("RowVersion")
  384. .IsConcurrencyToken()
  385. .HasColumnType("INTEGER");
  386. b.Property<string>("SubtitleLanguagePreference")
  387. .HasMaxLength(255)
  388. .HasColumnType("TEXT");
  389. b.Property<int>("SubtitleMode")
  390. .HasColumnType("INTEGER");
  391. b.Property<int>("SyncPlayAccess")
  392. .HasColumnType("INTEGER");
  393. b.Property<string>("Username")
  394. .IsRequired()
  395. .HasMaxLength(255)
  396. .HasColumnType("TEXT")
  397. .UseCollation("NOCASE");
  398. b.HasKey("Id");
  399. b.HasIndex("Username")
  400. .IsUnique();
  401. b.ToTable("Users", "jellyfin");
  402. });
  403. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  404. {
  405. b.HasOne("Jellyfin.Data.Entities.User", null)
  406. .WithMany("AccessSchedules")
  407. .HasForeignKey("UserId")
  408. .OnDelete(DeleteBehavior.Cascade)
  409. .IsRequired();
  410. });
  411. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  412. {
  413. b.HasOne("Jellyfin.Data.Entities.User", null)
  414. .WithMany("DisplayPreferences")
  415. .HasForeignKey("UserId")
  416. .OnDelete(DeleteBehavior.Cascade)
  417. .IsRequired();
  418. });
  419. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  420. {
  421. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  422. .WithMany("HomeSections")
  423. .HasForeignKey("DisplayPreferencesId")
  424. .OnDelete(DeleteBehavior.Cascade)
  425. .IsRequired();
  426. });
  427. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  428. {
  429. b.HasOne("Jellyfin.Data.Entities.User", null)
  430. .WithOne("ProfileImage")
  431. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  432. .OnDelete(DeleteBehavior.Cascade);
  433. });
  434. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  435. {
  436. b.HasOne("Jellyfin.Data.Entities.User", null)
  437. .WithMany("ItemDisplayPreferences")
  438. .HasForeignKey("UserId")
  439. .OnDelete(DeleteBehavior.Cascade)
  440. .IsRequired();
  441. });
  442. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  443. {
  444. b.HasOne("Jellyfin.Data.Entities.User", null)
  445. .WithMany("Permissions")
  446. .HasForeignKey("UserId")
  447. .OnDelete(DeleteBehavior.Cascade);
  448. });
  449. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  450. {
  451. b.HasOne("Jellyfin.Data.Entities.User", null)
  452. .WithMany("Preferences")
  453. .HasForeignKey("UserId")
  454. .OnDelete(DeleteBehavior.Cascade);
  455. });
  456. modelBuilder.Entity("Jellyfin.Data.Entities.Security.Device", b =>
  457. {
  458. b.HasOne("Jellyfin.Data.Entities.User", "User")
  459. .WithMany()
  460. .HasForeignKey("UserId")
  461. .OnDelete(DeleteBehavior.Cascade)
  462. .IsRequired();
  463. b.Navigation("User");
  464. });
  465. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  466. {
  467. b.Navigation("HomeSections");
  468. });
  469. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  470. {
  471. b.Navigation("AccessSchedules");
  472. b.Navigation("DisplayPreferences");
  473. b.Navigation("ItemDisplayPreferences");
  474. b.Navigation("Permissions");
  475. b.Navigation("Preferences");
  476. b.Navigation("ProfileImage");
  477. });
  478. #pragma warning restore 612, 618
  479. }
  480. }
  481. }