MadhuPeopleLink / django-crm

Automatically exported from code.google.com/p/django-crm
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

syncdb errors #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Environment: Snow Leopard with all latest updates
* default python
* django trunk installed
* python imaging library installed
* sample_project trunk with settings.py edited to point to database server and 
secret key added

What steps will reproduce the problem?
python manage.py syncdb

What is the expected output? 
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 312 object(s) from 2 fixture(s)

What do you see instead?
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table auth_message
Creating table django_admin_log
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table contactinfo_locationtype
Creating table contactinfo_location
Creating table contactinfo_address
Creating table contactinfo_phone
Creating table country
Creating table usstate
Creating table crm_contact_locations
Creating table crm_contact_business_types
Creating table crm_contact
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    execute_manager(settings)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/Users/nilesh/Documents/svn/djtrunk/django/core/management/commands/syncdb.py", line 97, in handle_noargs
    cursor.execute(statement)
  File "/Users/nilesh/Documents/svn/djtrunk/django/db/backends/util.py", line 15, in execute
    return self.cursor.execute(sql, params)
  File "/Users/nilesh/Documents/svn/djtrunk/django/db/backends/mysql/base.py", line 86, in execute
    return self.cursor.execute(query, args)
  File "build/bdist.macosx-10.6-universal/egg/MySQLdb/cursors.py", line 176, in execute
  File "build/bdist.macosx-10.6-universal/egg/MySQLdb/cursors.py", line 92, in _warning_check
_mysql_exceptions.Warning: Converting column 'picture' from VARCHAR to TEXT

Original issue reported on code.google.com by lvnil...@gmail.com on 2 Oct 2010 at 10:49

GoogleCodeExporter commented 8 years ago
jcd 2010/11/22.
I ran into this error on OS/X 10.5.8.
Take a look at crm/models.py.  Look at this line:

picture = models.ImageField(null=True, blank=True, max_length=1048576, 
upload_to="picture/profile/")

max_length defaults to 100.  I believe this is the storage allocated to the 
filename.  It's unreasonable to set this to 1048576!

I tried removing this parameter - letting it default to 100.  Now syncdb works 
fine.

Original comment by jdean...@gmail.com on 22 Nov 2010 at 5:49