python - Can SQLAlchemy do a non-destructive alter of the db comparing the current model with db schema? -
basically i'm looking equivalent of datamapper.auto_upgrade! ruby world.
in other words:
- change model
- run magic -> current db schema investigated , changed reflect model
- profit
of course, there cases when it's impossible such alteration non-desctructive, eg. when deleted attribute. don't mean such case. i'm looking general solution doesn't in way when rapidly prototyping , changing schema.
tia coders
[edit]
basically i've found i'm looking in sqlalchemy docs. wait here bit brave want write answer himself , earn points :)
sqlalchemy-migrate (http://packages.python.org/sqlalchemy-migrate/) intended these types of operations.
Comments
Post a Comment