title: Alembic --autogenerate producing empty migration
body: <p>I am trying to use <code>Alembic</code> for the first time and want to use <code>--autogenerate</code> feature described <a href="http://alembic.readthedocs.org/en/latest/tutorial.html#auto-generating-migrations" rel="noreferrer">here</a></p>
  
  <p>My project structure looks like</p>
  
  <pre><code>project/
         configuration/
                      __init__.py
                      dev.py
                      test.py
         core/
             app/
                models/
                      __init__.py
                      user.py
         db/
            alembic/
                    versions/
                    env.py
            alembic.ini
  </code></pre>
  
  <p>I am using <code>Flask</code> and <code>SQLAlchemy</code> and their <code>Flask-SQLAlchemy</code> extension. my model <code>User</code> looks like</p>
  
  <pre><code>class User(UserMixin, db.Model):
      __tablename__ = 'users'
      # noinspection PyShadowingBuiltins
      uuid = Column('uuid', GUID(), default=uuid.uuid4, primary_key=True,
                    unique=True)
      email = Column('email', String, nullable=False, unique=True)
      _password = Column('password', String, nullable=False)
      created_on = Column('created_on', sa.types.DateTime(timezone=True),
                          default=datetime.utcnow())
      last_login = Column('last_login', sa.types.DateTime(timezone=True),
                          onupdate=datetime.utcnow())
  </code></pre>
  
  <p>As described <a href="http://mattupstate.com/python/databases/2012/11/15/database-migrations-with-alembic-sqlalchemy-and-flask.html" rel="noreferrer">here</a>, I modified <code>env.py</code> to look like</p>
  
  <pre><code>from configuration import app
  
  alembic_config = config.get_section(config.config_ini_section)
  alembic_config['sqlalchemy.url'] = app.config['SQLALCHEMY_DATABASE_URI']
  engine = engine_from_config(
      alembic_config,
              prefix='sqlalchemy.',
              poolclass=pool.NullPool)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>from configuration import db
  
  
  target_metadata = db.metadata
  </code></pre>
  
  <p>where <code>configuration.__init__py</code> looks like</p>
  
  <pre><code>from flask import Flask
  from flask.ext.sqlalchemy import SQLAlchemy
  import dev
  
  
  app = Flask(__name__)
  app.config.from_envvar('SETTINGS_PT')
  db = SQLAlchemy(app)
  </code></pre>
  
  <p>Now when I run migration</p>
  
  <pre><code>$alembic revision --autogenerate -m "Added user table"
  INFO  [alembic.migration] Context impl PostgresqlImpl.
  INFO  [alembic.migration] Will assume transactional DDL.
    Generating /Users/me/IdeaProjects/project/db/alembic/versions/55a9d5
    35d8ae_added_user_table.py...done
  </code></pre>
  
  <p>but file <code>alembic/versions/55a9d5</code> has empty <code>upgrade()</code> and <code>downgrade()</code> methods</p>
  
  <pre><code>"""Added user table
  
  Revision ID: 1b62a62eef0d
  Revises: None
  Create Date: 2013-03-27 06:37:08.314177
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '1b62a62eef0d'
  down_revision = None
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  </code></pre>
  
  <p>How come it is not able to understand that there is a new <code>User</code> model?
  Please help</p>