title: Check if upgrades run correctly before upgrading table schema using Alembic
body: <p>I have a sample Table </p>
  
  <pre><code>class a(Base):
      __tablename__ = 'a'
      id = Column(Integer,primary_key=True)
      username = Column(VARCHAR(255))
  </code></pre>
  
  <p>Now I made some changes to my other tables and also added unique constraint to "username" column in the table shown above.</p>
  
  <pre><code>class a(Base):
      __tablename__ = 'a'
      id = Column(Integer,primary_key=True)
      username = Column(VARCHAR(255),unique=True)  # unique key added.
  </code></pre>
  
  <p>I run <code>python run.py db migrate</code> command and it detects all changes. No issue. 
  Now I run <code>python run.py db upgrade</code>. This makes all schema changes in the database but fails at the unique constraint of the above mentioned table, because that table already have repeated data. Now I need to revert all the db changes to come back to my previous version ( i can't figure how to do it). Is there anyway to test if the all the upgrades run properly before commiting schema changes to database ? if not, please help me how to revert all the db changes. </p>