Commits

Anonymous committed 4353cc9

Slightly nicer error messages.

  • Participants
  • Parent commits 530713e

Comments (0)

Files changed (1)

         if (app, name) not in done:
             for dapp, dname in needed_before_backwards(tree, app, name):
                 if (dapp, dname) in done:
-                    print "Migration (%s, %s) should not have been applied before (%s, %s) but was." % (get_app_name(app), name, get_app_name(dapp), dname)
+                    print " ! Migration (%s, %s) should not have been applied before (%s, %s) but was." % (get_app_name(dapp), dname, get_app_name(app), name)
                     problems.append(((app, name), (dapp, dname)))
     return problems
 
         if (app, name) in done:
             for dapp, dname in needed_before_forwards(tree, app, name):
                 if (dapp, dname) not in done:
-                    print "Migration (%s, %s) should have been applied before (%s, %s) but wasn't." % (get_app_name(dapp), dname, get_app_name(app), name)
+                    print " ! Migration (%s, %s) should have been applied before (%s, %s) but wasn't." % (get_app_name(dapp), dname, get_app_name(app), name)
                     problems.append(((app, name), (dapp, dname)))
     return problems
 
                 direction = -1
     
     if bad:
-        print "Bad!"
-        print nice_trace(forwards)
-        print
-        print nice_trace(backwards)
-        print
-        print missing
+        print " ! Inconsistent migration history"
+        print " ! Options to fix this will follow soon."
         sys.exit(1)
     
     if direction == 1:
+        print " - Migrating forwards to %s." % target_name
         for mapp, mname in forwards:
             if (mapp, mname) not in current_migrations:
                 run_forwards(get_app_name(mapp), [mname], fake=fake)
     elif direction == -1:
+        print " - Migrating backwards to just after %s." % target_name
         for mapp, mname in backwards:
             if (mapp, mname) in current_migrations:
                 run_backwards(get_app_name(mapp), [mname], fake=fake)