migrations are including dialect-specific datatypes for columns it should already know the datatype for
I have a simple test project i built, and generated the initial commit, and upgraded to it. The relevant section from the migration file is this:
op.create_table('user_profiles', ... sa.Column('po_zip', sa.String(length=12), nullable=True), ... }}}
I then edited the po_zip column on the model to be String(14) instead, and generated a new revision using autogenerate, and the detected change looks like this:
op.alter_column('user_profiles', u'po_zip', existing_type=mysql.VARCHAR(length=12), type_=sa.String(length=14), existing_nullable=True)
Now, the inclusion of mysql.* implies the migration read from the db to determine the diffs, rather than running the present migrations from base to head and using that as the base for comparison.
I'd like the generated diffs to be comparisons between the current orm.metadata and the generated metadata by running previous revisions up to the current head, rather than reading from the database. I'd like the generated diff to look like this:
op.alter_column('user_profiles', u'po_zip', existing_type=sa.String(length=12), type_=sa.String(length=14), existing_nullable=True)
Is there a way to accomplish this? Is autogenerate just comparing the current orm to the raw db everytime?