#10236: Change order of actions in syncdb
------------------------------------+---------------------------------------
 Reporter:  jbergstroem             |       Owner:  nobody    
   Status:  new                     |   Milestone:            
Component:  Core framework          |     Version:  SVN       
 Keywords:  order syncdb sql index  |       Stage:  Unreviewed
Has_patch:  1                       |  
------------------------------------+---------------------------------------
 Syncdb currently executes actions in this order:
  * Create tables
  * Create m2m tables
  * (optional) Run custom sql
  * Create indexes
  * (optional) Run fixtures

 This makes it hard to execute custom sql such as "remove these indexes
 that Django created for me but never are used". Changing the current order
 won't break anything since indexes are calculated from models, and if the
 user chooses to break their models - django can't do much about it. The
 optimal thing to do here is probably running indexes after fixtures has
 been inserted (faster inserts and index creation), but this is a larger
 step from the current way and needs to be thoroughly tested.

 Attached patch changes order so indexes are inserted before custom sql.
 Sqlall output is also patched for consistency. One additional thing that
 _could_ be clarified is documentation regarding good practices in fixtures
 and custom SQL - but this is far from needed in this patch.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10236>
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 [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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to