id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 7236,Table containing ForeignKey created with wrong casing,narendra.tumkur@…,George Vilches,"Here is the models.py: {{{ class Plugin(models.Model): name = models.CharField(max_length=50) description = models.CharField(max_length=100) class PluginContainer(models.Model): title = models.CharField(max_length=50) plugin_settings = models.CharField(max_length=2000) plugin = models.ForeignKey(Plugin) }}} PluginContainer refers to Plugin object (ForeignKey) Running manage.py syncdb produces the tables: {{{ App_plugin app_plugincontainer }}} notice the incorrect casing on app_plugincontainer. Removing the ForeignKey from PluginContainer correctly creates the table as App_plugincontainer This is causing a problem with running manage.py syncdb again as it cannot find App_plugincontainer and then tries to create app_plugincontainer and fails as the table already exists. My environment: OS: Mac OS X 10.5 DB: MySql 5.05 Python: 2.5 Django: SVN MySql's lower_case_table_names variable is set to 2 (default on mac os x) Cheers Naren",,closed,"Database layer (models, ORM)",dev,,worksforme,mysql case table name lower_case_table_names,,Unreviewed,0,0,0,0,0,0