#Push an application context when running db.create_all()
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'My connection string'
db.init_app(app)
# Add the with statement below to encapsulate db.create_all()
with app.app_context():
db.create_all()