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 #25304 -- Added option to allow management commands to check if migrations are applied. #5643

Conversation

mounirmesselmeni
Copy link
Contributor

adding required_migrations_checks to BaseCommand to support unapplied migrationgs on other managements command, runserver, createsuperuser and changepassword activate this check

@timgraham
Copy link
Member

Looks reasonable except tests aren't running and the new option should be documented in docs/howto/custom-management-commands.txt and the 1.10 release notes.

@mounirmesselmeni mounirmesselmeni force-pushed the 25304_management_commands_migrations_checks branch 3 times, most recently from c80279c to e288f17 Compare November 15, 2015 16:18
@mounirmesselmeni
Copy link
Contributor Author

Tests fixed and docs updated.

@timgraham timgraham changed the title Fixed #25304 -- Allow management commands to check if database migrations are applied Fixed #25304 -- Added option to allow management commands to check if migrations are applied. Dec 21, 2015
@timgraham
Copy link
Member

Looking good. Some minor edits: http://dpaste.com/1PAKNJA
I think a simple test in tests/user_commands/tests.py would be useful. Maybe mocking the BaseCommand.check_migrations() and testing whether or not it's called based on the value of requires_migrations_checks would be enough.

@timgraham
Copy link
Member

Hi, are you able to update this? We could offer it as "easy pickings" if not.

@mounirmesselmeni mounirmesselmeni force-pushed the 25304_management_commands_migrations_checks branch from e288f17 to b34ba82 Compare February 12, 2016 10:24
@mounirmesselmeni
Copy link
Contributor Author

Hi Tim, you can check the update which include the test.

@mounirmesselmeni mounirmesselmeni force-pushed the 25304_management_commands_migrations_checks branch from b34ba82 to eae6adb Compare February 12, 2016 10:50
… migrationgs on other managements command, runserver, createsuperuser and changepassword activate this check
@mounirmesselmeni mounirmesselmeni force-pushed the 25304_management_commands_migrations_checks branch from eae6adb to 1d2ada0 Compare February 12, 2016 10:59
@timgraham
Copy link
Member

merged in 50931df, thanks!

@timgraham timgraham closed this Feb 12, 2016
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