I'm following this tutorial.. and the initial auto generate is perfect.. it basically creates the migration file with the upgrade and downgrade methods just fine.
so let's say this is the migration file's revision number: 3e96cf22770b
.. all of my upgrade statements look like this:
def upgrade():
### commands auto generated by Alembic - please adjust! ###
op.create_table('hashtag',
sa.Column('id', sa.VARCHAR(), autoincrement=False, nullable=False),
sa.Column('text', sa.VARCHAR(), autoincrement=False, nullable=True),
sa.PrimaryKeyConstraint('id', name=u'hashtag_pkey')
)
and my downgrade statement looks like this:
def downgrade():
### commands auto generated by Alembic - please adjust! ###
op.drop_table('user_access_token')
Now I made a simple modification to my models.py file, this is what it looks like on git:
- verificationCode = Column(String())
+ isVerified = Column(Boolean())
The thing is, I have no idea how to run an autogenerate statement that actually just give me a delta migration file.. ie i just want a migration file that replaces one column by another..
i tried setting the current revision to 3e96cf22770b
then running
python migrate.py db revision --autogenerate
but then it keeps on creating duplicates of the initial migration file (ie migrating the entire database schema) rather than just the delta.. ideas?