20210320181425_AddIndexesAndCollations.Designer.cs 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535
  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("20210320181425_AddIndexesAndCollations")]
  13. partial class AddIndexesAndCollations
  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.3");
  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. .IsRequired()
  90. .HasColumnType("TEXT");
  91. b.HasKey("Id");
  92. b.HasIndex("UserId", "ItemId", "Client", "Key")
  93. .IsUnique();
  94. b.ToTable("CustomItemDisplayPreferences");
  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");
  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");
  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");
  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");
  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");
  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");
  245. });
  246. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  247. {
  248. b.Property<Guid>("Id")
  249. .ValueGeneratedOnAdd()
  250. .HasColumnType("TEXT");
  251. b.Property<string>("AudioLanguagePreference")
  252. .HasMaxLength(255)
  253. .HasColumnType("TEXT");
  254. b.Property<string>("AuthenticationProviderId")
  255. .IsRequired()
  256. .HasMaxLength(255)
  257. .HasColumnType("TEXT");
  258. b.Property<bool>("DisplayCollectionsView")
  259. .HasColumnType("INTEGER");
  260. b.Property<bool>("DisplayMissingEpisodes")
  261. .HasColumnType("INTEGER");
  262. b.Property<string>("EasyPassword")
  263. .HasMaxLength(65535)
  264. .HasColumnType("TEXT");
  265. b.Property<bool>("EnableAutoLogin")
  266. .HasColumnType("INTEGER");
  267. b.Property<bool>("EnableLocalPassword")
  268. .HasColumnType("INTEGER");
  269. b.Property<bool>("EnableNextEpisodeAutoPlay")
  270. .HasColumnType("INTEGER");
  271. b.Property<bool>("EnableUserPreferenceAccess")
  272. .HasColumnType("INTEGER");
  273. b.Property<bool>("HidePlayedInLatest")
  274. .HasColumnType("INTEGER");
  275. b.Property<long>("InternalId")
  276. .HasColumnType("INTEGER");
  277. b.Property<int>("InvalidLoginAttemptCount")
  278. .HasColumnType("INTEGER");
  279. b.Property<DateTime?>("LastActivityDate")
  280. .HasColumnType("TEXT");
  281. b.Property<DateTime?>("LastLoginDate")
  282. .HasColumnType("TEXT");
  283. b.Property<int?>("LoginAttemptsBeforeLockout")
  284. .HasColumnType("INTEGER");
  285. b.Property<int>("MaxActiveSessions")
  286. .HasColumnType("INTEGER");
  287. b.Property<int?>("MaxParentalAgeRating")
  288. .HasColumnType("INTEGER");
  289. b.Property<bool>("MustUpdatePassword")
  290. .HasColumnType("INTEGER");
  291. b.Property<string>("Password")
  292. .HasMaxLength(65535)
  293. .HasColumnType("TEXT");
  294. b.Property<string>("PasswordResetProviderId")
  295. .IsRequired()
  296. .HasMaxLength(255)
  297. .HasColumnType("TEXT");
  298. b.Property<bool>("PlayDefaultAudioTrack")
  299. .HasColumnType("INTEGER");
  300. b.Property<bool>("RememberAudioSelections")
  301. .HasColumnType("INTEGER");
  302. b.Property<bool>("RememberSubtitleSelections")
  303. .HasColumnType("INTEGER");
  304. b.Property<int?>("RemoteClientBitrateLimit")
  305. .HasColumnType("INTEGER");
  306. b.Property<uint>("RowVersion")
  307. .IsConcurrencyToken()
  308. .HasColumnType("INTEGER");
  309. b.Property<string>("SubtitleLanguagePreference")
  310. .HasMaxLength(255)
  311. .HasColumnType("TEXT");
  312. b.Property<int>("SubtitleMode")
  313. .HasColumnType("INTEGER");
  314. b.Property<int>("SyncPlayAccess")
  315. .HasColumnType("INTEGER");
  316. b.Property<string>("Username")
  317. .IsRequired()
  318. .HasMaxLength(255)
  319. .HasColumnType("TEXT")
  320. .UseCollation("NOCASE");
  321. b.HasKey("Id");
  322. b.HasIndex("Username")
  323. .IsUnique();
  324. b.ToTable("Users");
  325. });
  326. modelBuilder.Entity("Jellyfin.Data.Entities.AccessSchedule", b =>
  327. {
  328. b.HasOne("Jellyfin.Data.Entities.User", null)
  329. .WithMany("AccessSchedules")
  330. .HasForeignKey("UserId")
  331. .OnDelete(DeleteBehavior.Cascade)
  332. .IsRequired();
  333. });
  334. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  335. {
  336. b.HasOne("Jellyfin.Data.Entities.User", null)
  337. .WithMany("DisplayPreferences")
  338. .HasForeignKey("UserId")
  339. .OnDelete(DeleteBehavior.Cascade)
  340. .IsRequired();
  341. });
  342. modelBuilder.Entity("Jellyfin.Data.Entities.HomeSection", b =>
  343. {
  344. b.HasOne("Jellyfin.Data.Entities.DisplayPreferences", null)
  345. .WithMany("HomeSections")
  346. .HasForeignKey("DisplayPreferencesId")
  347. .OnDelete(DeleteBehavior.Cascade)
  348. .IsRequired();
  349. });
  350. modelBuilder.Entity("Jellyfin.Data.Entities.ImageInfo", b =>
  351. {
  352. b.HasOne("Jellyfin.Data.Entities.User", null)
  353. .WithOne("ProfileImage")
  354. .HasForeignKey("Jellyfin.Data.Entities.ImageInfo", "UserId")
  355. .OnDelete(DeleteBehavior.Cascade);
  356. });
  357. modelBuilder.Entity("Jellyfin.Data.Entities.ItemDisplayPreferences", b =>
  358. {
  359. b.HasOne("Jellyfin.Data.Entities.User", null)
  360. .WithMany("ItemDisplayPreferences")
  361. .HasForeignKey("UserId")
  362. .OnDelete(DeleteBehavior.Cascade)
  363. .IsRequired();
  364. });
  365. modelBuilder.Entity("Jellyfin.Data.Entities.Permission", b =>
  366. {
  367. b.HasOne("Jellyfin.Data.Entities.User", null)
  368. .WithMany("Permissions")
  369. .HasForeignKey("UserId")
  370. .OnDelete(DeleteBehavior.Cascade);
  371. });
  372. modelBuilder.Entity("Jellyfin.Data.Entities.Preference", b =>
  373. {
  374. b.HasOne("Jellyfin.Data.Entities.User", null)
  375. .WithMany("Preferences")
  376. .HasForeignKey("UserId")
  377. .OnDelete(DeleteBehavior.Cascade);
  378. });
  379. modelBuilder.Entity("Jellyfin.Data.Entities.DisplayPreferences", b =>
  380. {
  381. b.Navigation("HomeSections");
  382. });
  383. modelBuilder.Entity("Jellyfin.Data.Entities.User", b =>
  384. {
  385. b.Navigation("AccessSchedules");
  386. b.Navigation("DisplayPreferences");
  387. b.Navigation("ItemDisplayPreferences");
  388. b.Navigation("Permissions");
  389. b.Navigation("Preferences");
  390. b.Navigation("ProfileImage");
  391. });
  392. #pragma warning restore 612, 618
  393. }
  394. }
  395. }