2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-22 04:04:35 +00:00

[db] Backend setting improvements (#11500)

* Refactor database engine options

- Move to setting/db_backend.py
- Cleanup settings.py

* Fix documentation for postgres settings

* docs updates

* Add transaction_mode options for sqlite

* Update CHANGELOG with breaking changes

* Remove hard-coded database config

* Raise error on invalid backend

* Fix typos

* Fix broken redis link

* Limit to single worker thread for sqlite

* Update docs

* Add verbosity switch to dev.test task

* Add test timeout - kill hanging tests after 120s

* Set WAL mode for sqlite

* Use IMMEDIATE mode for background worker thread

* Use config to set WAL rather than custom hook

* Tweak pyproject settings

* Tweak code

* Increase timeouts

* Reset requirements to master
This commit is contained in:
Oliver
2026-03-18 00:01:17 +11:00
committed by GitHub
parent 34b7a559d7
commit 756c0be0b5
13 changed files with 220 additions and 124 deletions

View File

@@ -118,6 +118,9 @@ Extra python packages can be installed by setting the environment variable `SETU
The used database backend can be configured with environment variables (before the first setup) or in the config file after the installation. Check the [configuration section](./config.md#database-options) for more information.
!!! warning "SQLite Performance"
SQLite is not recommended for production use, as it is not designed for high concurrency.
## Moving Data
To change the data storage location, link the new location to `/opt/inventree/data`. A rough outline of steps to achieve this could be: