#1766: [patch] Syncdb fails if two models within an application refer to the 
same
database table.
--------------------------------+-------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  adrian
     Type:  defect              |      Status:  new   
 Priority:  normal              |   Milestone:        
Component:  Core framework      |     Version:        
 Severity:  normal              |    Keywords:        
--------------------------------+-------------------------------------------
 If two models within a single application, or in two applications within
 the same project, reference the same database table (by overriding
 db_table in the Meta class for at least one of them,) then 'manage.py
 syncdb' will try to create the table twice, causing the database backend
 to raise an exception, and manage.py will fail.
 
 django/core/management.py is getting a list of existing tables through
 database introspection in order to avoid exactly this problem. Currently,
 however, it does not update that list as it creates tables, so if a table
 is mentioned twice, it will blindly try to create it twice.
 
 This patch adds one line to syncdb() in management.py to update the list
 of existing tables as they are created.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1766>
Django <http://code.djangoproject.org/>
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to