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

Fixed #22675 -- makemigrations --dry-run to output migrations to stdout. #2717

Merged
merged 1 commit into from May 27, 2014

Conversation

mmardini
Copy link
Contributor

makemigrations --dry-run will output the complete migrations file
that would be written if it's used along with --verbosity 3.

@@ -137,6 +137,12 @@ def write_migration_files(self, changes):
migration_string = writer.as_string()
with open(writer.path, "wb") as fh:
fh.write(migration_string)
elif self.verbosity == 3:
# Alternatively, makemigrations --dry-run --verbosity 3
# will output the migrtations to stdout rather than saving
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

migrations*

`makemigrations --dry-run` will output the complete migrations file
that would be written if it's used along with `--verbosity 3`.
@mmardini
Copy link
Contributor Author

Thanks @timgraham for the review. I updated the files.

@timgraham timgraham merged commit 2e613ea into django:master May 27, 2014
@mmardini mmardini deleted the dry-run-verbosity-3 branch May 27, 2014 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants