mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-28 16:51:44 +00:00
wger: drop admin.logentry exclude from the PowerSync SQLite import (#3134)
wger does not install django.contrib.admin, so dumpdata rejected --exclude admin.logentry with "Unknown model" and the import aborted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e39427b13e
commit
e8ccde1200
3 files changed
+10
-5
No files matched your search
@@ -1,3 +1,7 @@
|
|||||||
|
## 2.8.0-dev.1.3 (2026-10-20)
|
||||||
|
|
||||||
|
- Fix the PowerSync SQLite import failing with `CommandError: Unknown model: admin.logentry`, which kept wger from starting. wger does not install Django's admin app, so the import no longer asks `dumpdata` to exclude its log table (#3134).
|
||||||
|
|
||||||
## 2.8.0-dev.1.2 (2026-10-19)
|
## 2.8.0-dev.1.2 (2026-10-19)
|
||||||
|
|
||||||
- Fix `root is not in the sudoers file` at startup, which made the PowerSync SQLite import fail (and wger refuse to start), and stopped the JWT keys from being generated. The image's `/etc/sudoers` only allowed the `wger` user; it now allows root too (#3123).
|
- Fix `root is not in the sudoers file` at startup, which made the PowerSync SQLite import fail (and wger refuse to start), and stopped the JWT keys from being generated. The image's `/etc/sudoers` only allowed the `wger` user; it now allows root too (#3123).
|
||||||
|
|||||||
+1
-1
@@ -27,5 +27,5 @@ schema:
|
|||||||
slug: wger
|
slug: wger
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: "2.8.0-dev.1.2"
|
version: "2.8.0-dev.1.3"
|
||||||
webui: "[PROTO:ssl]://[HOST]:[PORT:80]"
|
webui: "[PROTO:ssl]://[HOST]:[PORT:80]"
|
||||||
@@ -333,14 +333,15 @@ import_sqlite_data() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Dumped from the copy, with the tables Django rebuilds for itself left out: content
|
# Dumped from the copy, with the tables Django rebuilds for itself left out: content
|
||||||
# types and permissions are recreated by migrate, and admin log entries and sessions
|
# types and permissions are recreated by migrate, and sessions point at them. wger
|
||||||
# point at them. --natural-foreign keeps those references resolvable; primary keys
|
# does not install django.contrib.admin, so there is no admin.logentry to exclude:
|
||||||
# are deliberately kept as they are so the rows land unchanged.
|
# naming it makes dumpdata fail with "Unknown model" (#3134). --natural-foreign keeps
|
||||||
|
# those references resolvable; primary keys are deliberately kept as they are so the
|
||||||
|
# rows land unchanged.
|
||||||
if ! sqlite_manage "$copy" dumpdata \
|
if ! sqlite_manage "$copy" dumpdata \
|
||||||
--natural-foreign \
|
--natural-foreign \
|
||||||
--exclude contenttypes \
|
--exclude contenttypes \
|
||||||
--exclude auth.Permission \
|
--exclude auth.Permission \
|
||||||
--exclude admin.logentry \
|
|
||||||
--exclude sessions.session \
|
--exclude sessions.session \
|
||||||
--output "$dump"; then
|
--output "$dump"; then
|
||||||
bashio::log.error "PowerSync: reading the SQLite database failed, nothing was written to Postgres"
|
bashio::log.error "PowerSync: reading the SQLite database failed, nothing was written to Postgres"
|
||||||
|
|||||||
Reference in new issue
Block a user