Actually, the message says the table has a key greater than 767 bytes. On Mon, Aug 18, 2014 at 9:01 AM, Diogo Munaro <[email protected]> wrote: > You have a lot of indexes into one table > > Em segunda-feira, 23 de setembro de 2013 08h47min08s UTC-3, frasse escreveu: >> >> Hi All >> I try to follow migration recommendation for mysql in web2py 2.6.4 . as >> follow >> >> I am setting migrate_enabled=False >> everything is ok >> length=255 to string Fields >> everything is ok >> re-enable migrations with migrate_enabled=True >> application crash >> >> Here is Error >> >> Traceback (most recent call last): >> File "/var/web2py/gluon/restricted.py", line 217, in restricted >> exec ccode in environment >> File "/var/web2py/applications/myapp/models/db.py", line 72, in <module> >> auth.define_tables() >> File "/var/web2py/gluon/tools.py", line 1728, in define_tables >> format='%(first_name)s %(last_name)s (%(id)s)')) >> File "/var/web2py/gluon/dal.py", line 7895, in define_table >> table = self.lazy_define_table(tablename,*fields,**args) >> File "/var/web2py/gluon/dal.py", line 7932, in lazy_define_table >> polymodel=polymodel) >> File "/var/web2py/gluon/dal.py", line 1029, in create_table >> fake_migrate=fake_migrate) >> File "/var/web2py/gluon/dal.py", line 1136, in migrate_table >> self.execute(sub_query) >> File "/var/web2py/gluon/dal.py", line 1833, in execute >> return self.log_execute(*a, **b) >> File "/var/web2py/gluon/dal.py", line 1827, in log_execute >> ret = self.cursor.execute(command, *a[1:], **b) >> File "/var/web2py/gluon/contrib/pymysql/cursors.py", line 117, in >> execute >> self.errorhandler(self, exc, value) >> File "/var/web2py/gluon/contrib/pymysql/connections.py", line 202, in >> defaulterrorhandler >> raise errorclass, errorvalue >> InternalError: (1071, u'Specified key was too long; max key length is 767 >> bytes') >> >> >> any idea >> Thanks >> Frasse > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout.
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

