Do you have the error if unique=False? Massimo
On Oct 14, 5:25 pm, "richard.ree" <richard.h....@gmail.com> wrote: > The sql that fails is: > > CREATE TABLE expedition( > id INT AUTO_INCREMENT NOT NULL, > name VARCHAR(512) UNIQUE, > from_date DATE, > to_date DATE, > description LONGTEXT, > PRIMARY KEY(id) > ) ENGINE=InnoDB CHARACTER SET utf8; > > The table definition is: > > db.define_table( > "expedition", > Field("name", "string", unique=True), > Field("from_date", "date"), > Field("to_date", "date"), > Field("description", "text") > ) > > On Oct 13, 10:06 pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > can you email me the sql.log immediately after the error occurs? > > > On Sep 22, 11:13 am, Yannick <ytchatch...@gmail.com> wrote: > > > > Hello mate, > > > Below you can find the error message that I received from Database > > > (MySQL) when using the latest Web2py version: 1.67.1 BUT when I use an > > > old version Web2py: 1.66.2, I have NO problem NO error using the same > > > environment... > > > I wonder why this new release complaint ????? > > > > Please let me if you have any hint ??? > > > > Traceback (most recent call last): > > > File "/home/fedora/src/web2py/gluon/restricted.py", line 178, in > > > restricted > > > exec ccode in environment > > > File "/home/fedora/src/web2py/applications/AppName/models/db.py", > > > line 104, in <module> > > > buDefineTable.define_tables() > > > File "/home/fedora/src/web2py/applications/AppName/modules/ > > > dbDefinition.py", line 126, in define_tables > > > migrate = True) > > > File "/home/fedora/src/web2py/gluon/sql.py", line 1033, in > > > define_table > > > query = t._create(migrate=migrate) > > > File "/home/fedora/src/web2py/gluon/sql.py", line 1368, in _create > > > self._db._execute(query) > > > File "/home/fedora/src/web2py/gluon/sql.py", line 739, in <lambda> > > > self._execute = lambda *a, **b: self._cursor.execute(*a, **b) > > > File "/usr/lib/python2.6/site-packages/MySQLdb/cursors.py", line > > > 173, in execute > > > self.errorhandler(self, exc, value) > > > File "/usr/lib/python2.6/site-packages/MySQLdb/connections.py", line > > > 36, in defaulterrorhandler > > > raise errorclass, errorvalue > > > OperationalError: (1071, 'Specified key was too long; max key length > > > is 767 bytes') --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" 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 -~----------~----~----~----~------~----~------~--~---