#9116: different caps in application name producing error ---------------------------------------------+------------------------------ Reporter: Maxim Syabro <[EMAIL PROTECTED]> | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: 1.0 Keywords: | Stage: Unreviewed Has_patch: 0 | ---------------------------------------------+------------------------------ I have an application with name localModels and lower_case_table_names mysql variable=1, which said to MySQL automatically convert table name to lowercase. Let's look in djnago.core.management.commnads.syncdb.py, line 67: {{{ #!python if connection.introspection.table_name_converter(model._meta.db_table) in tables: continue }}} connection.introspection.table_name_converter(model._meta.db_table) = 'localModels_tablename' in tables we have (..., 'localmodels_tablename', ...) so here your condition doesn't work, beacuse 'localModels_tablename'!='localmodels_tablename'. And we have an exception in manage.py syncdb: _mysql_exceptions.OperationalError: (1050, "Table 'localmodels_tablename' already exists")
So I see at least 2 ways: 1. Generate SQL 'CREATE TABLE `tablename` IF NOT EXIST' 2. Check MySQL's lower_case_table_names variable and change condition on line 67. -- Ticket URL: <http://code.djangoproject.com/ticket/9116> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---