title: create_all method on database object not creating database tables
body: <p>I have a very basic Flask/SqlAlchemy project with one route located here.</p>
  
  <p><a href="https://github.com/thenetimp/flask_base_v2" rel="nofollow noreferrer">https://github.com/thenetimp/flask_base_v2</a></p>
  
  <p>In the route, I create a user object from the User model, but when I call the route I get the following error</p>
  
  <pre><code>sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such 
  table: user
  [SQL: INSERT INTO user (email_address, password, first_name, last_name, created_on, updated_on) VALUES (?, ?, ?, ?, ?, ?)]
  [parameters: ('jdoe@gmail.com', b'$2b$12$emg2oQcGeK0LEg5IFgie8eOEn2MJ/gKzyGWRPqOGJcQqlM1kCyskK', 'John', 'Doe', '2019-05-05 01:12:29.339788', '2019-05-05 01:12:29.339805')]
  (Background on this error at: http://sqlalche.me/e/e3q8)
  </code></pre>
  
  <p>In the app factory <code>create_app()</code> function I am calling <code>db.create_all()</code> to update the database and create the table, but it doesn't.  Other stack overflow questions with similar problems say that the wrong db reference is being used, but I do not know how to fix it so I am using the right reference.</p>
  
  <p>I have searched stackoverflow, but the answers to similar questions haven't helped my use case/app structure (which I would like to keep intact if possible).</p>
  
  <p>If someone could take a look I'd be grateful.</p>