Finishing the init_or_migrate function
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 1 Jan 2012 17:47:05 +0000 (11:47 -0600)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 29 Jan 2012 22:33:45 +0000 (16:33 -0600)
mediagoblin/db/sql/util.py

index 585c3b89b2ba2e8aa243a131ea48294ecb13e0c4..296c8b78a70c7a6ecefd72d8da6f887eeaa4dec7 100644 (file)
@@ -181,11 +181,17 @@ class MigrationManager(object):
                 u'~> Updating %s:\n' % self.name_for_printing())
             for migration_number, migration_func in migrations_to_run():
                 self.printer(
-                    u'   + Running migration %s, "%s"\n' % (
+                    u'   + Running migration %s, "%s"... ' % (
                         migration_number, migration_func.func_name))
+                migration_func(self.database)
+                self.printer('done.')
 
             return u'migrated'
 
+        # Otherwise return None.  Well it would do this anyway, but
+        # for clarity... ;)
+        return None
+
 
 class RegisterMigration(object):
     """