fix: set db type when overriding with DATABASE_URL

This commit is contained in:
realaravinth 2022-07-23 16:46:49 +05:30
parent 80214b776c
commit a040b39558
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -175,6 +175,9 @@ impl Settings {
Ok(val) => {
let url = Url::parse(&val).expect("couldn't parse Database URL");
s.set("database.url", url.to_string()).unwrap();
let database_type = DBType::from_url(&url).unwrap();
s.set("database.database_type", database_type.to_string())
.unwrap();
}
Err(e) => {
set_database_url(&mut s);