[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-07-01 Thread Gloria W
Got it, thanks for your help. --~--~-~--~~~---~--~~ 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

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-30 Thread Gloria W
I thought this was a scope problem, but it seems to be even bigger. This is the error I get: OperationalError: (OperationalError) (1067, Invalid default value for 'date_created') u'\nCREATE TABLE fu_op_requests (\n \tfu_op_requests_id INTEGER NOT NULL AUTO_INCREMENT, \n\tname VARCHAR(50),

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-30 Thread Michael Bayer
running this script: import sqlalchemy from sqlalchemy.databases import mysql engine = sqlalchemy.create_engine('mysql://scott:[EMAIL PROTECTED]/ test', echo=True) metadata = sqlalchemy.MetaData(engine) purchases_table = sqlalchemy.Table('fu_op_purchases',metadata,

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread Michael Bayer
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

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread jason kirtland
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] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread jason kirtland
jason kirtland wrote: 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] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread Gloria W
This gives me an error: sqlalchemy.Column('date_created', mysql.MSTimeStamp, sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)), nullable=False)) NameError: global name 'text' is not defined --~--~-~--~~~---~--~~ You received this message because you are

[sqlalchemy] Re: MySQL 5.0 DateTime initialization during Table creation is failing.

2008-06-29 Thread jason kirtland
Gloria W wrote: This gives me an error: sqlalchemy.Column('date_created', mysql.MSTimeStamp, sqlalchemy.PassiveDefault(text(CURRENT_TIMESTAMP)), nullable=False)) NameError: global name 'text' is not defined from sqlalchemy import text