wrolpi/alembic
lrnselfreliance 267b0230f4
Some checks are pending
Backend Tests / api-tests (core) (push) Waiting to run
Backend Tests / api-tests (files) (push) Waiting to run
Backend Tests / api-tests (media) (push) Waiting to run
Backend Tests / api-tests (rest) (push) Waiting to run
Backend Tests / api-contract-tests (push) Waiting to run
Backend Tests / api-migrations-and-start (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Controller Tests / controller-tests (push) Waiting to run
Cypress Tests / cypress-component-tests (push) Waiting to run
Cypress Tests / cypress-e2e-tests (push) Waiting to run
Dead Code / vulture (push) Waiting to run
Jest Tests / jest-tests (push) Waiting to run
Lead the statistics index with its expression, so mimetype lookups do not use it (#1090)
file_group_statistics_idx (#1088) was led by mimetype.  A database analyzed
before the index existed has no statistics for it, so SQLite guessed it was
the most selective index for `mimetype = ?` and chose it over
file_group_mimetype_effective_idx.  The newest-videos page then read and
sorted every video's row instead of reading one page in date order.

The index now leads with json_array_length(files), which no query filters
on, so it serves only the full statistics scan.  A new migration rebuilds it.

test_migrations_match_models also compares an expression index's terms,
since compare_metadata skips expression indexes and their order matters.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 18:37:56 -07:00
..
versions Lead the statistics index with its expression, so mimetype lookups do not use it (#1090) 2026-12-03 18:37:56 -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.