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:

  1. change model
  2. run magic -> current db schema investigated , changed reflect model
  3. 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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -