Skip to content

Commit

Permalink
Change max_connections option to default to 1
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo committed Apr 26, 2022
1 parent 8396bb3 commit ab806cf
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sea-orm-cli/src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ fn pool_options<DB>(max_connections: Option<u32>) -> PoolOptions<DB>
where
DB: sqlx::Database,
{
if let Some(max_cons) = max_connections {
PoolOptions::<DB>::new().max_connections(max_cons)
} else {
PoolOptions::<DB>::new()
}
PoolOptions::<DB>::new().max_connections(max_connections.unwrap_or(1))
}

pub fn run_migrate_command(matches: &ArgMatches<'_>) -> Result<(), Box<dyn Error>> {
Expand Down

0 comments on commit ab806cf

Please sign in to comment.