[sqlalchemy] Re: Pulling objects out of SQLAlchemy object

2010-07-04 Thread cd34
I've run into a minor stumbling block. My metadata table is set up as a relationship rather than Base.metadata. Since I needed to expose sorttree which would attached to the Base.metadata record, I was unsure how to modify that record using normal methods. I'm thinking that I might be able to us

[sqlalchemy] Many-to-many relationship on declarative tables and extra columns in intermediate table

2010-07-04 Thread yoshi
I have the following tables defined declaratively (very simplified version): class Profile(Base): __tablename__ = 'profile' id = Column(Integer, primary_key = True) name = Column(String(65), nullable = False) def __init__(self, name): self.name = name

Re: [sqlalchemy] altering tables with sqlite

2010-07-04 Thread Chris Withers
Carl Brewer wrote: In sqlite I hand-hacked a change to the table that needed changing, adding a field (which is not a linked field in any way), using alter table riders add gender string(1) That's fair enough, although you might look at the sqlalchemy-migrate or alembic packages for more wid