Esempio n. 1
0
def create_db():
    """ Creates DB tables
    """
    green("Creating all tables")
    with app.app_context():
        green('DB_URI: %s' % app.config.get('DB_URI'))
        db.metadata.create_all(db.get_engine(app))
Esempio n. 2
0
def create_db():
    """ Creates DB tables
    """
    green("Creating all tables")
    with app.app_context():
        green('DB_URI: %s' % app.config.get('DB_URI'))
        db.metadata.create_all(db.get_engine(app))
Esempio n. 3
0
def drop_db():
    """ Drops DB tables
    """
    yellow("Dropping all tables")
    with app.app_context():
        db.metadata.drop_all(db.get_engine(app))
Esempio n. 4
0
def drop_db():
    """ Drops DB tables
    """
    yellow("Dropping all tables")
    with app.app_context():
        db.metadata.drop_all(db.get_engine(app))