On 17/03/12 20:49, Swaroop Shankar V wrote:
Hello All,
I was developing a website and the development was all done using
sqlite database. Now the development is almost complete so i need to
test the site using mysql. When i did a syncdb on a fresh database i
got the following error:
Traceback (most recent call last):
File "./manage.py", line 19, in <module>
execute_manager(settings)
File
"/usr/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 438, in execute_manager
utility.execute()
<snip>
File
"/usr/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
line 51, in create_permissions
content_type=ctype
<snip>
File "/usr/lib64/python2.7/site-packages/MySQLdb/cursors.py", line
92, in _warning_check
warn(w[-1], self.Warning, 3)
_mysql_exceptions.Warning: Data truncated for column 'name' at row 1
When you run syncdb for the django auth app, it creates permissions for
your models [1]. It looks like it's trying to insert a permission with a
name longer than 50 characters, so it's getting truncated. Perhaps you
have:
* defined a custom permission with a really long name, or
* defined a model with a really long name so that "Can view <model>"
is longer than 50 characters.
Regards,
Alasdair Nicol
[1]: https://docs.djangoproject.com/en/dev/topics/auth/#default-permissions
--
Alasdair Nicol
Developer, MEMSET
mail: [email protected]
web: http://www.memset.com/
Memset Ltd., registration number 4504980. 25 Frederick Sanger Road, Guildford,
Surrey, GU2 7YD, UK.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.