mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-25 01:16:18 -05:00
Step 1 of the config import rework. A database config (tags, downloads, channels, domains, playlists, repos, recently viewed) and the database now each carry an integer version, so an import can tell which side is newer without a clock (a Raspberry Pi's resets at boot): - config_version (new table) holds the database's version of each config. - An after_flush hook adds one to it for every config whose rows a flush changed, in the same transaction. Each config registers what it owns (register_ownership): models, optionally only some columns, optionally only some rows (a Collection's kind; a Download's Collection's kind). Raw SQL writes to owned tables count explicitly. - dump_config writes the database's version, read with the rows it saves; save() no longer adds one for these configs. - An import compares versions first: file == database or newer imports with deletes; file older (the database changed and was not saved before a restart) saves the database instead of undoing that change; no database row (a config this code never imported) imports without deletes. The import records the file's version last. - The Import button and backup imports apply the file whatever its version (import_forced). Importers only gate their existing deletes on the decision here; they are otherwise unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 2026_07_10_1350_sqlite_baseline.py | ||
| 2026_07_14_0900_browse_covering_index.py | ||
| 2026_09_16_1200_file_group_stem.py | ||
| 2026_09_18_1200_unique_directory_stem.py | ||
| 2026_09_20_1200_drop_file_group_idempotency.py | ||
| 2026_09_27_1200_domain_collection_summary.py | ||
| 2026_09_28_1200_collection_listing_indexes.py | ||
| 2026_10_05_1200_markdown_mimetype.py | ||
| 2026_10_06_1200_repository.py | ||
| 2026_10_06_1300_repository_search.py | ||
| 2026_10_06_1400_repository_submodules.py | ||
| 2026_10_06_1500_repository_clone_token.py | ||
| 2026_10_08_1200_file_group_progress.py | ||
| 2026_10_24_1200_config_version.py | ||