title: Flask-Migrate "ModuleNotFoundError"
body: <p>I'm trying to make migrations on my Flask api based on SQLite db. Here is my project structure </p>
  
  <pre><code>├── app.py
  ├── blueprints
  ├── conf.py
  ├── db.sqlite
  ├── __init__.py
  ├── migrations
  ├── models.py
  └── templates
  </code></pre>
  
  <p>Then i initialize my migrate class in the <code>app.py</code></p>
  
  <pre><code>from flask import Flask, jsonify, request, render_template
  from flask_sqlalchemy import SQLAlchemy
  
  from conf import ErrorResponses, SuccessResponses
  
  # initialization
  app = Flask(__name__)
  db = SQLAlchemy(app)
  from models import User, db, BlackListToken
  
  # extensions
  from flask_migrate import Migrate
  mig = Migrate(app, db)
  </code></pre>
  
  <p>But it fails on importing from custom modules while <code>flask db migrate -m "rm id and made name/surname nullable"</code>.</p>
  
  <pre><code>Usage: flask db migrate [OPTIONS]
  
  Error: While importing "api_flask.app", an ImportError was raised:
  
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/dist-packages/flask/cli.py", line 235, in locate_app
      __import__(module_name)
    File "/home/zahessi/all/bubbie_D/api_flask/app.py", line 9, in &lt;module&gt;
      from conf import ErrorResponses, SuccessResponses
  ModuleNotFoundError: No module named 'conf'
  </code></pre>
  
  <p>Here is how <code>models.py</code> looks:</p>
  
  <pre><code>from app import db
  
  class User(db.Model):
      __tablename__ = 'users'
  
      username = db.Column(db.String(32), index=True, unique=True, nullable=False)
      email = db.Column(db.String(64), unique=True, nullable=False)
      password_hash = db.Column(db.String(64), nullable=False)
      name = db.Column(db.String(32))
      surname = db.Column(db.String(32))
      public_id = db.Column(db.String(32))
      creation_date = db.Column(db.DateTime)
      ...
  </code></pre>
  
  <p>When I remove all imports from custom py files, all seems to work, however, this is a lot of unnecessary work. Do you have any suggestions why does it work in that way? </p>
  
  <p>UPD: Added <code>conf.py</code>. It fails on every local import, on blueprints as well, depending on the order of the imports.</p>
  
  <pre><code>from re import findall
  
  class ErrorResponses:
      usernameOrPasswordBlank = {
          "success": False,
          "error": "Username and password cannot be blank."
      }
      userAlreadyExists = {"success": False, "error": "Such user already exists"}
      incorrectData = {
          "success": False,
          "error": "Incorrect username or password"
      }
      invalidData = {
          "success": False,
          "error": "Username or password is invalid"
      }
      noUser = {
          "success": False,
          "error": "There is no user with such username or public_id"
      }
      ...
  </code></pre>