Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#2959 closed defect (invalid)

Capital letters in app name break syncdb

Reported by: Yary Owned by: Adrian Holovaty
Component: Core (Other) Version: 0.95
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

create an app as in tutorial 1, but capitalize Polls:

python manage.py startapp Polls

>cd Polls; cat > models.py
from django.db import models

class Poll(models.Model):
    question = models.CharField(maxlength=200)
    pub_date = models.DateTimeField('date published')

^D

>cd ..

(add 'mysite.Polls' to settings.py INSTALLED_APPS)

>manage.py syncdb
Creating table Polls_poll
Adding permission 'poll | Can add poll'
Adding permission 'poll | Can change poll'
Adding permission 'poll | Can delete poll'

>manage.py syncdb
Creating table Polls_poll
Traceback ...
    raise errorclass, errorvalue
_mysql_exceptions.OperationalError: (1050, "Table 'polls_poll' already exists")

Change History (2)

comment:1 by Simon G. <dev@…>, 18 years ago

Resolution: invalid
Status: newclosed

I'm marking this as invalid, as the error is because you already have a polls_poll table. I can't replicate the upper/lowercase issue (the tablename appears to be cast to lowercase)

comment:2 by Collin Grady <cgrady@…>, 17 years ago

For anyone coming across this, the issue appears to be with lower_case_table_names in MySQL defaulting to 1 in Windows, which breaks this.

Note: See TracTickets for help on using tickets.
Back to Top