title: Postgresql and flask connection
body: <p>I'm using flask on <code>python3</code>.</p>
  
  <p>Migrate script is working no error from it. Main app is running fine too. 
  I'm using <code>postgresql</code> when I run migrate everything run fine but then somehow when I go in <code>postgres</code> shell I cannot see any table being created.</p>
  
  <p><strong>modesl.py</strong>    </p>
  
  <pre><code>from imports import db
  from datetime import datetime
  from sqlalchemy import ForeignKey
  from sqlalchemy.orm import relationship
  
  class UserInfo(db.Model):
  
      __tablename_ = 'user_info'
  
      id = db.Column(db.Integer, primary_key=True)
      username = db.Column(db.String(80), unique=True)
      email = db.Column(db.String(80), unique=True)
      password = db.Column(db.String(100), nullable=False)
      posts = relationship('UserPosts', backref='posts')
  
      def __init__(self, username, email, password):
          self.username = username
          self.email = email
          self.password = password
  
      def __repr__(self):
              return '{}-{}'.format(self.username, self.email)
  </code></pre>
  
  <p>As you can see I have two tables there but I just see <code>user_info</code> in my database because I manually created it but the other table I cannot see.</p>
  
  <pre><code>export DATABASE_URL="postgresql:user:password@localhost/registration"
  
  tail /var/log/apache2/error.log
  [Fri Oct 07 17:21:56.049888 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]   File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/util/compat.py", line 185, in reraise, referer: http://localhost/login/
  [Fri Oct 07 17:21:56.049900 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]     raise value.with_traceback(tb), referer: http://localhost/login/
  [Fri Oct 07 17:21:56.049919 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]   File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context, referer: http://localhost/login/
  [Fri Oct 07 17:21:56.049931 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]     context), referer: http://localhost/login/
  [Fri Oct 07 17:21:56.049951 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]   File "/usr/local/lib/python3.5/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute, referer: http://localhost/login/
  [Fri Oct 07 17:21:56.049962 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]     cursor.execute(statement, parameters), referer: http://localhost/login/
  [Fri Oct 07 17:21:56.050034 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358] sqlalchemy.exc.ProgrammingError: (psycopg2.ProgrammingError) column user_info.password does not exist, referer: http://localhost/login/
  [Fri Oct 07 17:21:56.050088 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358] LINE 1: ...nfo_username, user_info.email AS user_info_email, user_info...., referer: http://localhost/login/
  [Fri Oct 07 17:21:56.050106 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]                                                              ^, referer: http://localhost/login/
  [Fri Oct 07 17:21:56.050122 2016] [wsgi:error] [pid 19131:tid 140331236435712] [client 174.58.31.189:34358]  [SQL: 'SELECT user_info.id AS user_info_id, user_info.username AS user_info_username, user_info.email AS user_info_email, user_info.password AS user_info_password \\nFROM user_info'], referer: http://localhost/login/
  </code></pre>
  
  <p>I don't know if I'm setting my connection to the database the right way or if nothing is being created at all .</p>
  
  <p>Thanks.</p>
  
  <pre><code>from flask_script import Manager
  from flask_migrate import Migrate, MigrateCommand
  import os
  
  import __init__
  
  __init__.app.config.from_object(os.environ['APP_SETTINGS'])
  migrate = Migrate(__init__.app, __init__.db)
  manager = Manager(__init__.app)
  
  manager.add_command('db', MigrateCommand)
  
  if __name__ == '__main__':
      manager.run()
  </code></pre>