Database
Supported databases¶
The docker container contains drivers for sqlite, MySQL/MariaDB, Postgres and (Microsoft) SQL Server by default. Generally all drivers supported by SQLAlchemy generally can be used.
The Docker container only contains drivers for the below database. See the following table for the supported connection string strings. The connection strings support additional arguments, see the linked reference for further details.
| Database | Schema | Reference |
|---|---|---|
| SQLite | sqlite:///file | 🔗 |
| MySQL / MariaDB | mysql+pymysql://user:password@host/database | 🔗 |
| PostgreSQL | postgresql://user:password@host:port/database | 🔗 |
| (Microsoft) SQL Server | mssql+pymssql://user:password/name | 🔗 |
Database schema¶
For client integrations, two tables are relevant: users and tokens.
users:
- sub (text): value of the sub claim
- user (text): value of the configured username claim
- email (text): value of the email claim
tokens:
- id (UUID/text): Internal identifier of the token
- sub (text): value of the sub claim of the user
- name (text): user set name of the token
- token (text): the device password, see the configuration for configuring hashing
- expires (datetime, nullable): user configured expiration data