Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mysqldump generating use database #541

Merged
merged 5 commits into from
Jul 21, 2023

Conversation

greg-rychlewski
Copy link
Member

Closes #539.

There are 2 things:

  1. Allowing multiple prefixes for mysql requires the --databases flag, which automatically adds the use statement. So don't allow this for MySQL.
  2. When dump_cmd was created the run_with_cmd was refactored to add the --databases flag. Most likely in attempt to reduce duplication/clean up the code. Putting the database specification back into the callers because they are too different to generalize here (i.e. dump_with_cmd wants to use the config database, but structure_dump wants to allow custom prefixes).

@greg-rychlewski
Copy link
Member Author

i formatted one of the files accidentally =/. i will undo it

@josevalim
Copy link
Member

@greg-rychlewski btw, feel free to format as many files as you want in separate commits. I did it for some of the Ecto stuff already. It has been too long. :) In such cases, format, refactor any code that gets too nested, and commit+push directly, no need for PRs. :) We don't have to do it all upfront either. In batches we will eventually do it.

@greg-rychlewski greg-rychlewski merged commit 14d7ee2 into elixir-ecto:master Jul 21, 2023
9 checks passed
@greg-rychlewski greg-rychlewski deleted the mysqldump branch August 21, 2023 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ecto.dump adding create/drop/use statements
2 participants