db_management.py¶
DB initialisation and migration check.
- db_management.add_default_user(db)[source]¶
Add a default user.
User that will be added:
{ 'name': 'Default User', 'email': 'default_user@example.com', 'permissions': ['USER_MANAGEMENT'] }
Api_key: 1234 Auth_id: default::default
- db_management.check_db(config: dict)[source]¶
Perform database checks.
check if first-time setup has been performed
check that the data structure is up to date (migrations)
- Parameters
config (dict) – Configuration for the data tracker