For mySQL you could use unix_timestamp()
For Postgres you could use date_part('epoch',now())I've always used DateTime personally and have only ever reflected tables that used Integer timestamps. So I can't speak to the drawbacks or potential impacts with any authority. There may also be a more DB portable solution for this as well. On Jul 2, 12:52 pm, Lukasz Szybalski <[email protected]> wrote: > Hello, > What is the equivalent of the following but in the integer version. > > Column('_last_updated', DateTime(True), > default=func.current_timestamp(), > onupdate=func.current_timestamp()), > > Column('_last_updated', Integer, default=int(time.time(), onupdate=func.???), > > I see that project like trac uses the integer timestamps extensively. > Can it be used safely in any other project or there are some drawbacks > for it? > > Thanks, > Lucas > > -- > Using rsync. How to setup rsyncd.http://lucasmanual.com/mywiki/rsync > DataHub - create a package that gets, parses, loads, visualizes > datahttp://lucasmanual.com/mywiki/DataHub --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
