title: flask, cannot migrate. 'SQLALCHEMY_DATABASE_URI').replace('%', '%%')) AttributeError: 'NoneType' object has no attribute 'replace'
body: <p>I'm trying to make app following this tutorial <a href="https://www.codementor.io/olawalealadeusi896/restful-api-with-python-flask-framework-and-postgres-db-part-1-kbrwbygx5" rel="nofollow noreferrer">https://www.codementor.io/olawalealadeusi896/restful-api-with-python-flask-framework-and-postgres-db-part-1-kbrwbygx5</a> 
  But I'v stucked on running migrations with "python manage.py db migrate" I'm getting this errors, can't recognize their meaning, and don't know how to solve this, because I'm completely new in python.</p>
  
  <pre><code>FSADeprecationWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True or False to suppress this warning.
  </code></pre>
  
  <p>'SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and '</p>
  
  <pre><code>Traceback (most recent call last):
    File "manage.py", line 17, in &lt;module&gt;
      manager.run()
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/flask_script/__init__.py", line 417, in run
      result = self.handle(argv[0], argv[1:])
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/flask_script/__init__.py", line 386, in handle
      res = handle(*args, **config)
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
      return self.run(*args, **kwargs)
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/flask_migrate/__init__.py", line 95, in wrapped
      f(*args, **kwargs)
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/flask_migrate/__init__.py", line 215, in migrate
      version_path=version_path, rev_id=rev_id)
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/alembic/command.py", line 214, in revision
      script_directory.run_env()
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/alembic/script/base.py", line 489, in run_env
      util.load_python_file(self.dir, "env.py")
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/alembic/util/pyfiles.py", line 98, in load_python_file
      module = load_module_py(module_id, path)
    File "/home/jebbyk/.local/share/virtualenvs/blog_rest-pkqspueH/lib/python3.6/site-packages/alembic/util/compat.py", line 173, in load_module_py
      spec.loader.exec_module(module)
    File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed
    File "migrations/env.py", line 27, in &lt;module&gt;
      'SQLALCHEMY_DATABASE_URI').replace('%', '%%'))
  AttributeError: 'NoneType' object has no attribute 'replace'
  </code></pre>
  
  <p>It looks like the main problem in this line in migrations>env.py </p>
  
  <pre><code>config.set_main_option('sqlalchemy.url', current_app.config.get('SQLALCHEMY_DATABASE_URI').replace('%', '%%'))
  </code></pre>
  
  <p>but "migrations" directory was auto-generated after running "python manage.py db init"
  And I'm not sure that it can contain any errors</p>