Managing models, adding a declarative mixin

12 views
Skip to first unread message

Andrew Klaassen

unread,
Jun 24, 2011, 1:34:52 PM6/24/11
to migrat...@googlegroups.com
Hi,

Two questions, one leading into the other:

1. Is there any full-length, full-feature tutorial on using sqlalchemy-migrate with a fully declarative schema?  I've been searching the web all morning, but so far in vain.  I've also read all the official documentation I could find, and searched back through this list.  I'm starting to piece together a few ideas, but being able to put together a step-by-step procedure eludes me.

One thing in particular I'm not sure about: Can I describe the changes to both the model and the database in one place, or do I have to make the model and database changes in parallel?

If I have to make the changes in parallel, how do I (or can I?) use sqlalchemy to manage my model changes?  So far I've only found ways to manage database changes.

2. As a for-example, how would I use sqlalchemy-migrate to add something like the examples/generic_associations/discriminator_on_association.py address classes and mix them into a bunch of existing classes in an existing model?

I know these are big questions, so I apologize in advance.

Thanks!

Andrew

Jeremy Slade

unread,
Jun 24, 2011, 5:07:51 PM6/24/11
to migrat...@googlegroups.com, Andrew Klaassen
The general idea is that you change your model class definitions, and
then create the migrations that bring the db schema in line. There is no
versioning on the models (other than your source control).


Jeremy

Reply all
Reply to author
Forward
0 new messages