title: Flask-Migrate - 'Please edit configuratio/connection/logging settings' on 'flask db init'
body: <p>Have spent literally the past three days trying to figure this out and just can't seem to get it. Have reviewed other posts here and elsewhere regarding the same issue (see <a href="https://github.com/miguelgrinberg/Flask-Migrate/issues/173" rel="nofollow noreferrer">here</a>, <a href="https://stackoverflow.com/questions/51145234/flask-migrate-not-detecting-tables">here</a>, <a href="https://stackoverflow.com/questions/51783300/flask-migrate-no-changes-detected-to-schema-on-first-migration">here</a>, among others) countless times and am apparently just too dense to figure it out myself. So here we are, any help would be greatly appreciated.</p>
  <p>Project structure:</p>
  <pre><code>/project-path/
    /app.py
    /config.py
    /.flaskenv
    /app/__init__.py
    /app/models.py
    /app/routes.py
  </code></pre>
  <p>config.py</p>
  <pre><code>import os
  from dotenv import load_dotenv
  
  basedir = os.path.abspath(os.path.dirname(__file__))
  load_dotenv(os.path.join(basedir, '.env'))
  
  class Config(object):
      SECRET_KEY = os.environ.get('SECRET_KEY') or 'bleh'
      SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'app.db')
      SQLALCHEMY_TRACK_MODIFICATIONS = False
  </code></pre>
  <p>app.py</p>
  <pre><code>from app import create_app
  app = create_app() 
  </code></pre>
  <p>.flaskenv</p>
  <pre><code>FLASK_APP=app.py
  </code></pre>
  <p>/app/<strong>init</strong>.py</p>
  <pre><code>import os
  from flask import Flask
  from flask_sqlalchemy import SQLAlchemy
  from flask_migrate import Migrate
  from flask_marshmallow import Marshmallow
  
  from config import Config
  
  db = SQLAlchemy()
  migrate = Migrate()
  ma = Marshmallow()
  
  def create_app(config_class=Config):
      app = Flask(__name__)
      app.config.from_object(config_class)
  
      from app.models import Borrower
  
      db.init_app(app)
      migrate.init_app(app, db)
  
      from app.routes import borrowers_api
      app.register_blueprint(borrowers_api)
  
      return app
  </code></pre>
  <p>/app/models.py</p>
  <pre><code>from app import db, ma
  from marshmallow_sqlalchemy import SQLAlchemyAutoSchema
  
  class Borrower(db.Model):
      __tablename__ = 'borrowers'
      
      id = db.Column(db.Integer, primary_key=True, autoincrement=True)
      borrower_name = db.Column(db.String(100), nullable=False, unique=True, index=True)
      
      def __init__(self, borrower_name):
          self.borrower_name = borrower_name
  
  class BorrowerSchema(ma.SQLAlchemyAutoSchema):
      class Meta:
          model = Borrower
          include_relationships = True
          load_instance = True #Optional: deserialize to model instances  
  
  borrower_schema = BorrowerSchema()
  borrowers_schema = BorrowerSchema(many=True)
  </code></pre>
  <p>/app/routes.py</p>
  <pre><code>from flask import Blueprint, request, jsonify
  
  from app.models import Borrower, borrower_schema, borrowers_schema
  from app import db
  
  borrowers_api = Blueprint('borrowers_api', __name__)
  
  # Add a borrower
  @borrowers_api.route('/borrower', methods=['POST'])
  def add_borrower():
      borrower_name = request.get_json(force=True)['borrower_name']
      new_borrower = Borrower(borrower_name)
      db.session.add(new_borrower)
      db.session.commit()
      return borrower_schema.jsonify(new_borrower)
  
  # Get single borrower by id
  @borrowers_api.route('/borrower/&lt;id&gt;', methods=['GET'])
  def get_borrower(id):
      borrower = Borrower.query.get(id)
      return borrower_schema.jsonify(borrower)
  </code></pre>
  <p>Yet all I continue to run into the following:</p>
  <pre><code>(env-name) C:\Users\...\flask-scratchwork\flask-restapi-tryagain&gt;flask db init
  Creating directory C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations ...  done
  Creating directory C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations\versions ...  done
  Generating C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations\alembic.ini ...  done
  Generating C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations\env.py ...  done
  Generating C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations\README ...  done
  Generating C:\Users\...\flask-scratchwork\flask-restapi-tryagain\migrations\script.py.mako ...  done
  Please edit configuration/connection/logging settings in 'C:\\Users\\...\\flask-scratchwork\\flask-restapi-tryagain\\migrations\\alembic.ini' before proceeding.
  </code></pre>
  <p>Where am I going wrong?</p>