projects
/
mediagoblin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This was a very small update, I'm hoping to rebase after this to solve some
[mediagoblin.git]
/
mediagoblin
/
db
/
migration_tools.py
diff --git
a/mediagoblin/db/migration_tools.py
b/mediagoblin/db/migration_tools.py
index ad13768374db97f1c810bcaaed283e233e59a4dc..e75f37572c6cb036ed7f8787d313f1e8ecc9fac6 100644
(file)
--- a/
mediagoblin/db/migration_tools.py
+++ b/
mediagoblin/db/migration_tools.py
@@
-147,10
+147,11
@@
class MigrationManager(object):
in mediagoblin.db.models
"""
for Model, rows in self.foundations.items():
in mediagoblin.db.models
"""
for Model, rows in self.foundations.items():
- print u'\n + Laying foundations for %s table' % (Model.__name__)
+ self.printer(u' + Laying foundations for %s table\n' %
+ (Model.__name__))
for parameters in rows:
new_row = Model(**parameters)
for parameters in rows:
new_row = Model(**parameters)
-
new_row.save(
)
+
self.session.add(new_row
)
def create_new_migration_record(self):
"""
def create_new_migration_record(self):
"""
@@
-215,9
+216,8
@@
class MigrationManager(object):
self.init_tables()
# auto-set at latest migration number
self.create_new_migration_record()
self.init_tables()
# auto-set at latest migration number
self.create_new_migration_record()
- self.populate_table_foundations()
-
self.printer(u"done.\n")
self.printer(u"done.\n")
+ self.populate_table_foundations()
self.set_current_migration()
return u'inited'
self.set_current_migration()
return u'inited'