Пример #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))
Пример #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))
Пример #3
0
def drop_db():
    """ Drops DB tables
    """
    yellow("Dropping all tables")
    with app.app_context():
        db.metadata.drop_all(db.get_engine(app))
Пример #4
0
def drop_db():
    """ Drops DB tables
    """
    yellow("Dropping all tables")
    with app.app_context():
        db.metadata.drop_all(db.get_engine(app))