Hi All
I try to follow migration recommendation for mysql in web2py 2.6.4 . as
follow
1. I am setting migrate_enabled=False
2. everything is ok
3. length=255 to string Fields
4. everything is ok
5. re-enable migrations with migrate_enabled=True
6. 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"
<https://farzad.dipconnect.com/admin/default/edit/btcpirates/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/groups/opt_out.