Commits

shaib  committed 0308698 Merge

branch merge

  • Participants
  • Parent commits 79acae9, 4f9e1e6
  • Branches dont-leave-defaults

Comments (0)

Files changed (3)

File south/db/generic.py

         if self.dry_run:
             return []
 
-        get_logger().debug('execute "%s" with params "%s"' % (sql, params))
+        get_logger().debug(u'execute "%s" with params "%s"' % (sql, params))
 
         try:
             cursor.execute(sql, params)
         """
         Generates a full SQL statement to add a foreign key constraint
         """
-        constraint_name = '%s_refs_%s_%x' % (from_column_name, to_column_name, abs(hash((from_table_name, to_table_name))))
+        constraint_name = '%s_refs_%s_%x' % (from_column_name, to_column_name, self._digest(from_table_name, to_table_name))
         return 'ALTER TABLE %s ADD CONSTRAINT %s FOREIGN KEY (%s) REFERENCES %s (%s)%s;' % (
             self.quote_name(from_table_name),
             self.quote_name(self.shorten_name(constraint_name)),

File south/hacks/django_1_0.py

                 try:
                     management._commands['flush'] = SkipFlushCommand()
                     # run create_test_db
-                    f(*args, **kwargs)
+                    return f(*args, **kwargs)
                 finally:
                     # unpatch flush back to the original
                     management._commands['flush'] = original_flush_command

File south/migration/__init__.py

     "Takes a set of possible problems and gets the actual issues out of it."
     result = []
     for last, migration in problems:
+        checked = set([])
         # 'Last' is the last applied migration. Step back from it until we
         # either find nothing wrong, or we find something.
         to_check = list(last.dependencies)
         while to_check:
             checking = to_check.pop()
+            if checking in checked:
+                continue
+            checked.add(checking)
+
             if checking not in done:
                 # That's bad. Error.
                 if verbosity: