title: flask sqlalchemy getting Unknown column error despite having them
body: <p>So... I'm trying to commit some sql from flask app inside, and the model code is as follows:</p>
  
  <pre><code>class User(UserMixin, db.Model):
      __tablename__ = '_users'
  
      id = db.Column(db.Integer, primary_key=True)
      user_email = db.Column(db.VARCHAR(50), nullable=False, unique=True)
      user_reg_date = db.Column(db.TIMESTAMP, nullable=False)
      last_login = db.Column(db.TIMESTAMP, nullable=True)
      passwd = db.Column(db.VARCHAR(80), nullable=True)
      social_id = db.Column(db.VARCHAR(80), nullable=True, unique=True)
  
      def __init__(self, user_email, passwd, social_id):
          self.user_email = user_email
          self.user_reg_date = current_time()
          self.passwd = passwd
          self.social_id = social_id
  
  
  class Player(db.Model):
      __tablename__ = '_players'
  
      id = db.Column(db.Integer, primary_key=True)
      player_unique_id = db.Column(db.Integer, unique=True)
      user_id = db.Column(db.Integer, db.ForeignKey('_users.id'))
      affiliated_crew_id = db.Column(db.Integer, db.ForeignKey('crew.id'))
      player_nick = db.Column(db.VARCHAR(50), unique=True)
      player_highscore = db.Column(db.Integer)
      player_badge = db.Column(db.VARCHAR(100))
      player_rank = db.Column(db.Integer)
  
      def __init__(self, player_unique_id, user_id, affiliated_crew_id
                   , player_nick):
          self.player_unique_id = player_unique_id
          self.user_id = user_id
          self.affiliated_crew_id = affiliated_crew_id
          self.player_nick = player_nick
          self.player_highscore = 0
          self.player_badge = None
          self.player_rank = 0
  </code></pre>
  
  <p>I already have the proper columns in the SQL(as I written these from pre-made tables) it's all correct.</p>
  
  <p>the part committing the sql is as follows:</p>
  
  <pre><code>player = Player(player_unique_id=00000, user_id=user_num, affiliated_crew_id=crew_id
                  , player_nick=nick)
  db.session.add(player)
  db.session.commit()
  </code></pre>
  
  <p>and it's returning this: </p>
  
  <blockquote>
    <p>sqlalchemy.exc.InternalError: (pymysql.err.InternalError) (1054, "Unknown column '_users.id' in 'field list'") [SQL: 'INSERT INTO _players (player_unique_id, user_id, affiliated_crew_id, player_nick, player_highscore, player_badge, player_rank) VALUES (%(player_unique_id)s, _users.id, %(affiliated_crew_id)s, %(player_nick)s, %(player_highscore)s, %(player_badge)s, %(player_rank)s)'] [parameters: {'player_unique_id': 84658, 'affiliated_crew_id': '1', 'player_nick': 'player', 'player_highscore': 0, 'player_badge': None, 'player_rank': 0}]</p>
  </blockquote>
  
  <p>what am I doing wrong here? searching didn't help so far...</p>