Skip to content

Commit

Permalink
Ignore nil config database in dump_cmd for MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-rychlewski authored Jul 21, 2023
1 parent 14d7ee2 commit 04f1b1e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ecto/adapters/myxql.ex
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,13 @@ defmodule Ecto.Adapters.MyXQL do

@impl true
def dump_cmd(args, opts \\ [], config) when is_list(config) and is_list(args) do
args = args ++ [config[:database]]
args =
if database = config[:database] do
args ++ [database]
else
args
end

run_with_cmd("mysqldump", config, args, opts)
end

Expand Down

0 comments on commit 04f1b1e

Please sign in to comment.