def action_sync(self, options, args): """Create the database tables for all the INSTALLED_PACKAGES whose tables haven't been created yet. """ models, __pending = self.get_models() try: for model in models: if options.verbose: print "Sync table %r" % (model._meta.table) database.create_table(model) except: database.rollback() raise else: database.commit()
def test_drop_table(self): if settings.DATABASE_ENGINE == "gae": return database.drop_table(Comment) self.assertFalse(database.exists_table(Comment)) database.create_table(Comment)