#15412: Custom SQL fixtures appear to be loaded in the wrong order.
------------------------------------------+---------------------------------
 Reporter:  al_the_x                      |          Owner:  nobody    
   Status:  new                           |      Milestone:            
Component:  Database layer (models, ORM)  |        Version:  1.2       
 Keywords:  sql fixture                   |   Triage Stage:  Unreviewed
Has patch:  0                             |  
------------------------------------------+---------------------------------
 When using custom SQL fixtures for loading SQL into the database (i.e. a
 VIEW for an unmanaged Model class or SQL INSERT / UPDATE statements),
 there are two filenames that can be used:

 * `[model_name].sql`
 * `[model_name].[db_driver].sql`

 The latter is reserved for RDBMS-specific SQL statements that might differ
 from the standard, such as use of `CREATE RULE` for VIEWs in Postgres vice
 `CREATE TRIGGER` in SQLite. If _both_ files are used, the order in which
 the two are loaded and passed to the database is undesirable.

 EXPECTED: If I use both a generic SQL fixture _and_ a RDBMS-specific SQL
 fixture, the generic fixture should be loaded first (i.e. for VIEW or
 TABLE definitions), then the other.

 ACTUAL: Django consistently loads the driver-specific file _before_ the
 generic SQL fixture, instead. This can lead to unnecessary code
 duplication or failure.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15412>
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 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to