wrolpi/alembic
lrnselfreliance 77133fab8d
File statistics are counted from a covering index (#1088)
get_file_statistics summed json_array_length(files) and size over every
file_group row.  A row also holds the file's indexed text, so on a large
library reading every row from a cold disk cache took minutes, and the
Statistics page timed out.

file_group_statistics_idx (mimetype, size, json_array_length(files)) holds
everything the query reads, so it scans only the index.  SQLite 3.46 labels
the step "USING INDEX" (it opens the table with a deferred seek it never
performs); the test checks the bytecode, so it holds on both labels.

test_migrations_match_models also checks that every model index exists in
the migrated database: alembic's compare_metadata skips expression indexes.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:04:54 -07:00
..
versions File statistics are counted from a covering index (#1088) 2026-12-03 18:04:54 -07:00
env.py Upgrade to SQLAlchemy 2.0 (synchronous) (#803) 2026-10-09 15:08:40 -06:00
README A new start 2021-11-01 16:43:09 -06:00
script.py.mako Postgres -> SQLite hard cutover: the database moves into the media directory. 2026-07-12 14:09:37 -06:00

Generic single-database configuration.