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))
def drop_db(): """ Drops DB tables """ yellow("Dropping all tables") with app.app_context(): db.metadata.drop_all(db.get_engine(app))