Todd Blanchard wrote:
> I have this definition in my upgrade script using migrate
>
> meta = MetaData(migrate_engine)
> DeclarativeBase = declarative_base(metadata=meta)
> maker = sessionmaker(autoflush=True, autocommit=False,
>                      extension=ZopeTransactionExtension())
> DBSession = scoped_session(maker)
> DBSession.configure(bind=migrate_engine)
>
> class MarkerGraphic(DeclarativeBase):
>     __tablename__ = 'marker_graphics'
>     id = Column(Integer, primary_key=True)
>     base_url = Column(Unicode,default="http://chart.apis.google.com/
> chart")
>
> class EventType(MarkerGraphic):
>     __tablename__ = 'event_types'
>     __mapper_args__ = {'concrete':True}
>
>     id = Column(Integer, primary_key=True)
>     name = Column(Unicode(60), nullable=False, unique=True)
>
>     def __unicode__(self):
>         return self.name
>
> and when doing an upgrade, only the EventType columns are created in
> the db (postgresql).
>
> Is concrete not compatible with declarative?

Concrete is entirely compatible with declarative.   I don't see where
you're issuing metadata.create_all() above, yet you say its creating one
of the tables, so the above is not a full script.




>
> --
> 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.
>
>

-- 
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