diff options
author | tilly-Q <nattilypigeonfowl@gmail.com> | 2013-08-20 12:02:20 -0400 |
---|---|---|
committer | tilly-Q <nattilypigeonfowl@gmail.com> | 2013-08-20 12:02:20 -0400 |
commit | e1561d048815e29b3b7c7e1c860d9cf0c4326f0a (patch) | |
tree | 691fe54e5b6a1dcb6799d673a99f01e850a6a9f9 /mediagoblin/db/migration_tools.py | |
parent | 8394febbe1408030d1afa8f3961d92341eefa474 (diff) | |
download | mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.lz mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.tar.xz mediagoblin-e1561d048815e29b3b7c7e1c860d9cf0c4326f0a.zip |
This was a very small update, I'm hoping to rebase after this to solve some
other problems. I started looking at the tests in this update. This update I
spent fixing the tests to work with my new code.
--\ mediagoblin/db/migration_tools.py
--| Merging from ticket 679
--\ mediagoblin/db/migrations.py
--| Added unique constraint to Privilege.privilege_name
--\ mediagoblin/db/models.py
--| Deleted vestigial Privilege.is_admin_or_moderator method
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--| Add a `Ban User` / `UnBan User` for admin
--\ mediagoblin/test/test_api.py
--| Fixed test with my new changes
--\ mediagoblin/test/test_auth.py
--| Try to fix test, still having problems
--\ mediagoblin/test/test_modelmethods.py
--| Wrote my first test for the User.has_privilege method
--\ mediagoblin/test/test_modelmethods.py
--| Fixed test with my new changes
--\ mediagoblin/test/test_sqlmigrations.py
--| Merging from ticket 679
--\ mediagoblin/test/tools.py
--| Editted add_fixture_user to allow for privileges rather than active column
Diffstat (limited to 'mediagoblin/db/migration_tools.py')
-rw-r--r-- | mediagoblin/db/migration_tools.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mediagoblin/db/migration_tools.py b/mediagoblin/db/migration_tools.py index ad137683..e75f3757 100644 --- 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(): - 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) - new_row.save() + self.session.add(new_row) 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.populate_table_foundations() - self.printer(u"done.\n") + self.populate_table_foundations() self.set_current_migration() return u'inited' |