to my knowledge MySQL doesn't support DEFAULT on date/time columns. You can work with the MySQL database directly a little bit to confirm this.
On Jun 28, 2008, at 3:18 PM, Gloria W wrote: > > Hi All, > > Looking back in these posts, I tried several older variants of MySQL > datetime column initialization discussed here, and they're not > working. > > This works in Postgresql: > > sqlalchemy.Column('date_created', sqlalchemy.DateTime, > sqlalchemy.PassiveDefault(sqlalchemy.sql.func.now()), > nullable=False) > > But the MySQL equivalent fails: > > sqlalchemy.Column('date_created', sqlalchemy.DateTime, > sqlalchemy.PassiveDefault(text("CURRENT_TIMESTAMP")), > nullable=False) > > What is the valid syntax? Is it failing for other reasons? > > Thank you in advance, > Gloria > > > --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---