예제 #1
0
파일: db.py 프로젝트: garyyeap/zoe-robot
 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()
예제 #2
0
파일: db.py 프로젝트: lafada/kalapy
 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()
예제 #3
0
파일: db.py 프로젝트: lafada/kalapy
 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)