Ways to manage DB migrations with SQLAlchemy? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-11-29 16:55:17

问题


I've looked at sqlalchemy-migrate, but it just seems like a lot of work and I haven't been able to find any useful examples.

Anyone care to share how they handle this?


回答1:


Check out new project Alembic: http://readthedocs.org/docs/alembic/en/latest/index.html




回答2:


I don't have any personal experience with sqlalchemy-migrate, but here's a tutorial:

http://caneypuggies.alwaysreformed.com/wiki/DevelopingWithMigrations

If you use the scripts mentioned there, you can create migrations like this:

./new_migration.sh "Describe the new migration here"

I do all my migrations with South: http://south.aeracode.org/ Note that it depends on the Django framework though.



来源:https://stackoverflow.com/questions/5293669/ways-to-manage-db-migrations-with-sqlalchemy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!