20221022080052_AddIndexActivityLogsDateCreated.Designer.cs 22 KB

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