David Gouldin avatar David Gouldin committed 6843158

Adding option to check migrations for an individual app only.

Comments (0)

Files changed (1)


     help = "Runs migrations for each app in turn, detecting missing depends_on values."
     usage_str = "Usage: ./manage.py migrationcheck"
-    def handle(self, **options):
+    def handle(self, check_app_name=None, **options):
         runner = simple.DjangoTestSuiteRunner(verbosity=0)
         err_msg = "Failed to migrate %s; see output for hints at missing dependencies:\n"
         failures = 0
-        for app_name in settings.INSTALLED_APPS:
+        if check_app_name is None:
+            app_names = settings.INSTALLED_APPS
+        else:
+            app_names = [check_app_name]
+        for app_name in app_names:
             app_label = app_name.split(".")[-1]
             if app_name == 'south':
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.