MySQL schema sync or diff

Chris Angelico rosuav at gmail.com
Thu Jan 5 17:46:16 EST 2017


On Thu, Jan 5, 2017 at 11:02 AM, Charles Heizer <ceh329 at gmail.com> wrote:
> I have a MySQL database that is not managed (yet) and I would like to get an
output or diff against my new model file. I'm using flask-sqlalchemy.
>
> Are there any modules that would help me discover the differences so that I
can script a migration to begin using flask-migrate?

I'm not specifically aware of any such tool per se, but what you may want to 
consider is a tool for generating models from existing tables. Then you could 
diff the generated models against your hand-made ones, and build your 
migrations from that. Expect a ton of noise, though.

ChrisA



More information about the Python-list mailing list