Write default config if it doesn't exist

This commit is contained in:
Andras Schmelczer 2024-12-08 15:00:57 +00:00
parent 3f5409da60
commit 3c24ad83e1
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 35 additions and 6 deletions

View file

@ -21,3 +21,12 @@ fn default_max_connections() -> u32 {
debug!("Using default max connections: {}", DEFAULT_MAX_CONNECTIONS);
DEFAULT_MAX_CONNECTIONS
}
impl Default for DatabaseConfig {
fn default() -> Self {
Self {
sqlite_url: default_sqlite_url(),
max_connections: default_max_connections(),
}
}
}