fix: prevent implicit database creation on connection for SQLite (#1986)
This commit is contained in:
4 files changed
+18
-18
No files matched your search
@@ -605,12 +605,7 @@ pub async fn test_connection(state: State<'_, Arc<AppState>>, config: Connection
|
||||
extension
|
||||
})
|
||||
.collect();
|
||||
match db::sqlite::connect_path_create_if_missing_with_extensions(
|
||||
&expand_tilde(&config.host),
|
||||
extensions,
|
||||
)
|
||||
.await
|
||||
{
|
||||
match db::sqlite::connect_path_with_extensions(&expand_tilde(&config.host), extensions).await {
|
||||
Ok(_) => Ok("Connection successful".to_string()),
|
||||
Err(e) => Err(e),
|
||||
}
|
||||
@@ -875,8 +870,7 @@ pub async fn connect_db(state: State<'_, Arc<AppState>>, config: ConnectionConfi
|
||||
})
|
||||
.collect();
|
||||
PoolKind::Sqlite(
|
||||
db::sqlite::connect_path_create_if_missing_with_extensions(&expand_tilde(&db_config.host), extensions)
|
||||
.await?,
|
||||
db::sqlite::connect_path_with_extensions(&expand_tilde(&db_config.host), extensions).await?,
|
||||
)
|
||||
}
|
||||
DatabaseType::Redis => {
|
||||
|
||||
Reference in new issue
Block a user