I did it this way:

class AccountHistory(Base):
    id     = sa.Column(sa.types.Integer, primary_key=1)
    date  = sa.Column(sa.types.DateTime, nullable=0,
default=sa.func.current_timestamp())
    type  = sa.Column(sa.types.Integer, nullable=0, default=1)

    def getdefault(self, name):
         return
self._sa_class_manager.get(name).property.columns[0].default.arg

But perhaps is a better way ...

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

Reply via email to