Opened 12 years ago

Closed 12 years ago

Last modified 11 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:


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

python startapp Polls

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

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


>cd ..

(add 'mysite.Polls' to INSTALLED_APPS)

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

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

Change History (2)

comment:1 Changed 12 years ago by Simon G. <dev@…>

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 Changed 11 years ago by Collin Grady <cgrady@…>

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