Ejemplo n.º 1
0
 def run(self):
     from solace import database
     if self.drop_first:
         database.drop_tables()
         print 'dropped existing tables'
     database.init()
     print 'created database tables'
Ejemplo n.º 2
0
 def run(self):
     from solace import database
     if self.drop_first:
         database.drop_tables()
         print 'dropped existing tables'
     database.init()
     print 'created database tables'
Ejemplo n.º 3
0
 def run(self):
     from solace import database, models
     database.drop_tables()
     print 'dropped existing tables'
     database.init()
     print 'created database tables'
     admin = models.User(self.username, self.email, self.password,
                         is_admin=True)
     database.session.commit()
     print 'Created %s:%s (%s)' % (self.username, self.password,
                                   self.email)
Ejemplo n.º 4
0
 def run(self):
     from solace import database, models
     database.drop_tables()
     print 'dropped existing tables'
     database.init()
     print 'created database tables'
     admin = models.User(self.username,
                         self.email,
                         self.password,
                         is_admin=True)
     database.session.commit()
     print 'Created %s:%s (%s)' % (self.username, self.password, self.email)