This commit is contained in:
2023-08-29 21:34:01 +02:00
parent 3d05e80d84
commit 8ed85b6f72
4 changed files with 47 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ pub async fn init_database_pool(url: &str) -> Result<Pool<Sqlite>, StartError> {
.max_connections(5)
.connect_with(
SqliteConnectOptions::from_str(url)?
.log_statements(log::LevelFilter::Off)
.log_statements(log::LevelFilter::Debug)
.log_slow_statements(log::LevelFilter::Warn, time::Duration::from_millis(100))
.pragma("foreign_keys", "1"),
)
@@ -26,7 +26,7 @@ pub async fn migrate(url: &str) -> Result<(), StartError> {
.connect_with(
SqliteConnectOptions::from_str(url)?
.pragma("foreign_keys", "0")
.log_statements(log::LevelFilter::Off),
.log_statements(log::LevelFilter::Debug),
)
.await?;