SQLAlchemy DB Migration

Merwin merwin.irc at gmail.com
Sun Nov 6 04:44:06 EST 2011


Hi everybody,

I'm looking for a way to migrate SQLAlchemy based database easily. I 
found Migrate, but finally it's almost the same as doing the migration 
by hand.

If this doesn't exists, do you think that it would be hard to do a 
simple migration tool which would :

     - Add/Delete columns from DB if they are not anymore in the models 
(With a confirmation for deletion)
     - Add/Delete constraints/sequences on table if they are not on the 
model too

We could also imagine a way to :

     - Handle column rename, with data copy from one to another
     - Handle column type change, with proper data conversion

Of course, such a system can't be 100% automated, that's not the goal. 
Human interventation will be needed, but it might be more simpler for 
simple cases than Migrate.

--
Thibaut



More information about the Python-list mailing list