On Thu, Mar 5, 2009 at 12:17 PM, Joril <[email protected]> wrote:
> I'm looking for a way to handle database migrations/upgrades and found
> projects such as sqlalchemy-migrate and mikuru.. My understanding is
> that those projects expect the model to be in NON-declarative form,
> that is, with users_table = Table(...) and the like.. But what if my
> program uses exclusively declarative? Can I use them all the same? Or
> are there tools that work with declarative, or should I roll my own?

Declarative is not really a problem... You can always get to the table
object with ClassName.__table__

When you create new columns, don't forget that you need to flip the
column declaration around

class Bar(Base):
    foo = Column(String)

becomes

foo = Column('foo', String)


I'm using declarative with sqlalchemy-migrate just fine.

Kevin


-- 
Kevin Dangoor

work: http://labs.mozilla.com/
email: [email protected]
blog: http://www.BlueSkyOnMars.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to