Skip to content

Commit

Permalink
Update psql drop_command to force dropdb
Browse files Browse the repository at this point in the history
The reason behind it is to improve developer experience, as right now when
running a command like `hanami db reset` it will fail if the user has any other
ongoing connection, like a connection to db client(like dbeaver), or a `hanami
console` session.
  • Loading branch information
Andsbf committed Apr 4, 2023
1 parent a6b06e1 commit 1871506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hanami/cli/commands/app/db/utils/postgres.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def create_command

# @api private
def drop_command
system(cli_env_vars, "dropdb #{escaped_name}")
system(cli_env_vars, "dropdb --force #{escaped_name}")
end

# @api private
Expand Down

0 comments on commit 1871506

Please sign in to comment.