Files
jellytau/api/jellytau_lib/storage/schema/index.html
T

20 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Database schema and migrations"><title>jellytau_lib::storage::schema - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2"href="../../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../../static.files/rustdoc-17e0aaed.css"><meta name="rustdoc-vars" data-root-path="../../../" data-static-root-path="../../../static.files/" data-current-crate="jellytau_lib" data-themes="" data-resource-suffix="" data-rustdoc-version="1.97.1 (8bab26f4f 2026-07-14)" data-channel="1.97.1" data-search-js="search-fd9372ac.js" data-stringdex-js="stringdex-2da4960a.js" data-settings-js="settings-170eb4bf.js" ><script src="../../../static.files/storage-41dd4d93.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../../static.files/main-fcd733ba.js"></script><noscript><link rel="stylesheet" href="../../../static.files/noscript-f7c3ffd8.css"></noscript><link rel="alternate icon" type="image/png" href="../../../static.files/favicon-32x32-eab170b8.png"><link rel="icon" type="image/svg+xml" href="../../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><a class="skip-main-content" href="#main-content">Skip to main content</a><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><rustdoc-topbar><h2><a href="#">Module schema</a></h2></rustdoc-topbar><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../../jellytau_lib/index.html">jellytau_<wbr>lib</a><span class="version">0.10.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module schema</a></h2><h3><a href="#constants">Module Items</a></h3><ul class="block"><li><a href="#constants" title="Constants">Constants</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In jellytau_<wbr>lib::<wbr>storage</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><section id="main-content" class="content" tabindex="-1"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="../../index.html">jellytau_lib</a>::<wbr><a href="../index.html">storage</a></div><h1>Module <span>schema</span>&nbsp;<button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../../src/jellytau_lib/storage/schema.rs.html#1-821">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Database schema and migrations</p>
<p>TRACES: UR-002 | DR-012 | IR-013</p>
</div></details><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><dl class="item-table"><dt><a class="constant" href="constant.MIGRATIONS.html" title="constant jellytau_lib::storage::schema::MIGRATIONS">MIGRATIONS</a></dt><dd>List of migrations to apply in order.
Each migration is a tuple of (name, sql).</dd><dt><a class="constant" href="constant.MIGRATION_001.html" title="constant jellytau_lib::storage::schema::MIGRATION_001">MIGRATION_<wbr>001</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Initial schema migration</dd><dt><a class="constant" href="constant.MIGRATION_002.html" title="constant jellytau_lib::storage::schema::MIGRATION_002">MIGRATION_<wbr>002</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to remove access_token column from users table
Tokens are now stored in the system keyring (or encrypted file fallback)</dd><dt><a class="constant" href="constant.MIGRATION_003.html" title="constant jellytau_lib::storage::schema::MIGRATION_003">MIGRATION_<wbr>003</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to relax foreign key constraints on user_data table
Allows tracking playback progress for items not yet synced to local database</dd><dt><a class="constant" href="constant.MIGRATION_004.html" title="constant jellytau_lib::storage::schema::MIGRATION_004">MIGRATION_<wbr>004</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to enhance downloads table with priority and bytes_downloaded</dd><dt><a class="constant" href="constant.MIGRATION_005.html" title="constant jellytau_lib::storage::schema::MIGRATION_005">MIGRATION_<wbr>005</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to relax foreign key constraint on downloads.item_id
Allows downloading items that havent been synced to local database yet</dd><dt><a class="constant" href="constant.MIGRATION_006.html" title="constant jellytau_lib::storage::schema::MIGRATION_006">MIGRATION_<wbr>006</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to store item metadata directly in downloads table
This eliminates dependency on items table being synced and fixes UUID display issues</dd><dt><a class="constant" href="constant.MIGRATION_007.html" title="constant jellytau_lib::storage::schema::MIGRATION_007">MIGRATION_<wbr>007</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to enhance thumbnail caching with LRU eviction support</dd><dt><a class="constant" href="constant.MIGRATION_008.html" title="constant jellytau_lib::storage::schema::MIGRATION_008">MIGRATION_<wbr>008</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add video download support and item pinning</dd><dt><a class="constant" href="constant.MIGRATION_009.html" title="constant jellytau_lib::storage::schema::MIGRATION_009">MIGRATION_<wbr>009</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add people/cast caching support</dd><dt><a class="constant" href="constant.MIGRATION_010.html" title="constant jellytau_lib::storage::schema::MIGRATION_010">MIGRATION_<wbr>010</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add playback context tracking</dd><dt><a class="constant" href="constant.MIGRATION_011.html" title="constant jellytau_lib::storage::schema::MIGRATION_011">MIGRATION_<wbr>011</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add user-specific player settings</dd><dt><a class="constant" href="constant.MIGRATION_012.html" title="constant jellytau_lib::storage::schema::MIGRATION_012">MIGRATION_<wbr>012</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to track download source (user-initiated vs auto-cached)</dd><dt><a class="constant" href="constant.MIGRATION_013.html" title="constant jellytau_lib::storage::schema::MIGRATION_013">MIGRATION_<wbr>013</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add composite index for offline mode filtering</dd><dt><a class="constant" href="constant.MIGRATION_014.html" title="constant jellytau_lib::storage::schema::MIGRATION_014">MIGRATION_<wbr>014</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add series audio track preferences</dd><dt><a class="constant" href="constant.MIGRATION_015.html" title="constant jellytau_lib::storage::schema::MIGRATION_015">MIGRATION_<wbr>015</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add device ID storage</dd><dt><a class="constant" href="constant.MIGRATION_016.html" title="constant jellytau_lib::storage::schema::MIGRATION_016">MIGRATION_<wbr>016</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to add autoplay episode limit setting</dd><dt><a class="constant" href="constant.MIGRATION_017.html" title="constant jellytau_lib::storage::schema::MIGRATION_017">MIGRATION_<wbr>017</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to persist the resolved stream URL and target directory on each
download row. This lets the backend queue pump start a pending download by
itself (replaying the stored URL) once a concurrency slot frees up, instead
of relying on the frontend to re-issue every queued item.</dd><dt><a class="constant" href="constant.MIGRATION_018.html" title="constant jellytau_lib::storage::schema::MIGRATION_018">MIGRATION_<wbr>018</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to record whether a cached item is a folder/container vs a playable
leaf. Needed so channel items (which can be either) route to the player or to
a browse list correctly. Existing cached rows predate the column and have an
unknown folder flag, so we force a refresh by clearing their <code>synced_at</code>,
causing the hybrid repository to re-fetch them from the server on next browse.</dd><dt><a class="constant" href="constant.MIGRATION_019.html" title="constant jellytau_lib::storage::schema::MIGRATION_019">MIGRATION_<wbr>019</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to cache the full server genre catalog. Previously genres were
derived on the fly from cached albums, which meant offline (and the hybrid
cache-first race) only ever saw genres for the handful of locally-cached
albums — collapsing the variety on the music/TV/movie landing pages. This
table stores the complete genre list per library so offline has the real
catalog and cache-first routing returns the right thing.</dd><dt><a class="constant" href="constant.MIGRATION_020.html" title="constant jellytau_lib::storage::schema::MIGRATION_020">MIGRATION_<wbr>020</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Migration to index <code>items.season_id</code>.</dd><dt><a class="constant" href="constant.MIGRATION_021.html" title="constant jellytau_lib::storage::schema::MIGRATION_021">MIGRATION_<wbr>021</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Discard and rebuild the FTS index from the <code>items</code> table.</dd><dt><a class="constant" href="constant.MIGRATION_022.html" title="constant jellytau_lib::storage::schema::MIGRATION_022">MIGRATION_<wbr>022</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Full-text index over <code>people</code>, mirroring <code>items_fts</code>.</dd><dt><a class="constant" href="constant.MIGRATION_023.html" title="constant jellytau_lib::storage::schema::MIGRATION_023">MIGRATION_<wbr>023</a><span title="Restricted Visibility">&nbsp;🔒</span> </dt><dd>Give temporary downloads a life limit.</dd></dl></section></div></main></body></html>