From ce8d5d3e1742223e5a41d6d120746e441c5535e2 Mon Sep 17 00:00:00 2001 From: catborise Date: Fri, 6 Nov 2026 15:20:45 +0300 Subject: [PATCH] docs(readme): a PostgreSQL installation keeps its DATABASES across an update Step 2 rebuilds settings.py from the template, whose DATABASES is sqlite unless WEBVIRTCLOUD_DB_HOST is set; its list of values to put back did not name DATABASES. An installation that set PostgreSQL in settings.py (the only way before the WEBVIRTCLOUD_DB_* variables) would have migrate make a new, empty sqlite database and the panel start on it. Checked by upgrading an installation of the upstream release of September 2026 on PostgreSQL 16 with DATABASES put back: every user, permission, owner, compute, VM and log row came through. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1832a9e9..32df6ce9 100644 --- a/README.md +++ b/README.md @@ -634,7 +634,7 @@ Move the `environment=` values of that config into `/etc/default/webvirtcloud` ( diff "$b/settings.py" webvirtcloud/settings.py ``` - Typical ones are `TIME_ZONE`, `WS_*`, `ALLOWED_HOSTS`, `CSRF_TRUSTED_ORIGINS` and LDAP. Two need care: + Typical ones are `TIME_ZONE`, `WS_*`, `ALLOWED_HOSTS`, `CSRF_TRUSTED_ORIGINS`, LDAP and, with PostgreSQL, your `DATABASES`: the template's is sqlite, so without it `migrate` would make a new, empty sqlite database and the panel would start on that. Two need care: - a literal `SECRET_KEY = "..."` (older installers wrote it there): put the value into `data/secret_key` instead (`mkdir -p data` first if there is no `data/`). With no key, `migrate` in step 3 stops with "The SECRET_KEY setting must not be empty" and every page fails; with another key, every user is signed out; - `SHOW_PROFILE_EDIT_PASSWORD`: keep it for this one `migrate` if you have it (migration `accounts.0008` reads it), then delete it.