mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 11:16:47 +00:00
0001_initial to 0024_log_retention_setting are mostly RunPython steps that added, renamed, re-chose and described setting rows since 2020. A squashed migration now creates the table in its final shape and inserts the 38 rows those steps leave; it replaces all 24, so a new database runs it alone. The 24 stay beside it, as Django's squashing expects until every installation has applied them: a database that applied them all records the squashed one without running anything, and one that stopped between them (an older release, or an upstream installation) applies the rest of them first. Checked: - on a new database its rows equal the old chain's (name, key, value, choices, description of every row); - on a copy of a running panel's database (all 24 applied) migrate plans nothing for appsettings; - a database migrated by the old code to 0023 applies 0024 and then records the squashed migration, with the same 38 rows; - makemigrations finds no change. It inserts its rows on the database being migrated, as the replaced steps do. The tests of the replaced steps stay, since an installation that stopped between them still runs them; the two that checked a few rows' columns became one that checks every row's columns and description, and a value is one of its choices. |
||
|---|---|---|
| .. | ||
| management | ||
| migrations | ||
| templates | ||
| tests | ||
| __init__.py | ||
| apps.py | ||
| context_processors.py | ||
| middleware.py | ||
| models.py | ||
| settings.py | ||
| views.py | ||