Exemplo 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))
Exemplo 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))
Exemplo 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))
Exemplo 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))