title: Flask Migrate using different postgres schemas ( __table_args__ = {'schema': 'test_schema']})
body: <p>I'm trying to use flask, sqlalchemy, and flask_migrate...</p>
  
  <p>But every time run manage.py migrate, alembic always detect my model as a new table.</p>
  
  <p>I think that i put  <strong>table_args</strong> in my model to store table in a different postgres schema:</p>
  
  <pre><code>class Entry(db.Model):
      __table_args__ = {'schema': app.config['BASE_SCH']}
      id = db.Column(db.Integer, primary_key=True)
      title = db.Column(db.String(100))
      slug = db.Column(db.String(100), unique=True)
      body = db.Column(db.Text)
      status = db.Column(db.SmallInteger, default=STATUS_PUBLIC)
      created_timestamp = db.Column(db.DateTime, default=datetime.datetime.now)
      modified_timestamp = db.Column(db.DateTime, default=datetime.datetime.now, onupdate=datetime.datetime.now)
  </code></pre>
  
  <p>If I to delete the <strong>table_args</strong> line of my model, the flask migrate works properly. Storing my table in puclic postgres schema.</p>
  
  <p>So, how can I use different postgres table schemas with flask?</p>
  
  <p>Thanks!</p>