Question

Posted the model at http://pastebin.com/f609771cc

getting error: (yes it's windows) File "C:\Python25\lib\site-packages\MySQLdb\connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1050, "Table 'memorial_music' already exists")

scanned the whole project directory and memorial_music is only referenced twice

once as a table name and once as table name 'memorial_music_category'

this one has me scratching my head, any ideas?

Was it helpful?

Solution

django-mptt was the culprit

renamed table for memorial_music to memorial_music_library and everything went smooth

thank you django for manage.py sqlall appname

OTHER TIPS

Being a Django newbie I was having syncdb problems all the time. Every time I would run it I would get Error ** table already exists. After searching for answers with no avail and reading over and over again that syncdb : "Creates the database tables for all apps in INSTALLED_APPS whose tables have not already been created.". I finally realized that when I did the initial python manage.py startapp UserData .... the capitalization of UserData was messing Django up (I'm using MYSQL). If would have called it userData I wouldn't have had any problems. I hope this helps someone with the same problem I had.

Edit **

Maybe it wasn't a problem with the capitalization, I think naming a table called userData in Django just doesn't work overall.

I have the same problem today. Make sure all of your project folders names are lowercase. I think it would all work out.

The complaint is that the table already exists in the database. Django cannot update an existing table. You either need to drop the table from the MySQL database, and syncdb again, or manually adjust the table schema to the model.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top