diff --git a/sea-orm-cli/src/commands.rs b/sea-orm-cli/src/commands.rs index 028f941cf3..259604a75b 100644 --- a/sea-orm-cli/src/commands.rs +++ b/sea-orm-cli/src/commands.rs @@ -186,11 +186,7 @@ fn pool_options(max_connections: Option) -> PoolOptions where DB: sqlx::Database, { - if let Some(max_cons) = max_connections { - PoolOptions::::new().max_connections(max_cons) - } else { - PoolOptions::::new() - } + PoolOptions::::new().max_connections(max_connections.unwrap_or(1)) } pub fn run_migrate_command(matches: &ArgMatches<'_>) -> Result<(), Box> {