Fix memory db closing
This commit is contained in:
parent
d7798783ba
commit
0112e552fd
|
@ -57,12 +57,12 @@ impl BlogDb {
|
|||
}
|
||||
}
|
||||
let memory = SqlitePoolOptions::new()
|
||||
.min_connections(1)
|
||||
.connect_with(
|
||||
#[cfg(not(debug_assertions))]
|
||||
SqliteConnectOptions::from_str(MEMORY_URL)?.journal_mode(SqliteJournalMode::Memory),
|
||||
#[cfg(debug_assertions)]
|
||||
SqliteConnectOptions::from_str(MEMORY_URL.as_ref())?
|
||||
.journal_mode(SqliteJournalMode::Wal),
|
||||
SqliteConnectOptions::from_str(MEMORY_URL)?.journal_mode(SqliteJournalMode::Wal),
|
||||
)
|
||||
.await?;
|
||||
Self::run_main_migrations(&db).await?;
|
||||
|
|
Loading…
Reference in New Issue