Fix (storage): Avoid bug creating file for in-mem sqlite
This commit is contained in:
parent
7f67ac0107
commit
3a27c7e389
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ pub async fn create_pool(db_url: String) -> AnyPool {
|
|||
sqlx::any::install_default_drivers();
|
||||
|
||||
// Create SQLite database file if it does not exist
|
||||
if db_url.starts_with("sqlite:") {
|
||||
if db_url.starts_with("sqlite:") && db_url != ("sqlite::memory:") {
|
||||
let path = db_url.replace("sqlite:", "");
|
||||
if !Path::new(&path).exists() {
|
||||
warn!("Sqlite database does not exist, creating file {}", path);
|
||||
|
|
|
|||
Loading…
Reference in a new issue