Can you post your sql.log file? It is in the applicaitons/yourapp/ databases folder.
Massimo On Jun 20, 10:35 pm, "richard_gor...@verizon.net" <richard_gor...@verizon.net> wrote: > I'm migrating an existing web2py app from sqlite to mysql. The sqlite > version runs fine. The mysql version chokes on the date and datetime > fields: > > Here's the table: > db.define_table('x', > db.Field('name','string',length=25,requires=[IS_NOT_EMPTY > (),IS_NOT_IN_DB(db,'x.name')]), > db.Field('f1','datetime',requires=IS_DATETIME()), > db.Field('f2','datetime',requires=IS_DATETIME()), > db.Field('f3','string',requires=IS_IN_SET(range(1,10))), > db.Field('f4','date',requires=IS_NULL_OR(IS_DATE())), > ) > > Here's the traceback message: > Traceback (most recent call last): > File "gluon/restricted.py", line 107, in restricted > File "C:/web2py/applications/SPiNup/models/1_tables.py", line 57, in > <module> > File "gluon/sql.py", line 993, in define_table > File "gluon/sql.py", line 1314, in _create > File "gluon/sql.py", line 731, in <lambda> > File "MySQLdb\cursors.pyc", line 166, in execute > File "MySQLdb\connections.pyc", line 35, in defaulterrorhandler > ProgrammingError: (1064, "You have an error in your SQL syntax; check > the manual that corresponds to your MySQL server version for the right > syntax to use near 'repeat VARCHAR(32),\n\trstop DATE,\n\tPRIMARY KEY > (id)\n) ENGINE=InnoDB CHARACTER SET ' at line 6") > > Line 57 in 1_tables.py is the db.Field('f4','date'... ) field. If I > comment out the f4 date field, I get the same problem on the f2 field, > which is a datetime. > > Anybody have an idea what the problem is? Could my installation be bad? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---