#16550: Django should load custom SQL when testing
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  nobody
  elver.loho@…                       |         Status:  closed
                   Type:  New        |      Component:  Database layer
  feature                            |  (models, ORM)
              Milestone:             |       Severity:  Normal
                Version:  1.3        |       Keywords:
             Resolution:  wontfix    |      Has patch:  0
           Triage Stage:             |    Needs tests:  0
  Unreviewed                         |  Easy pickings:  1
    Needs documentation:  0          |
Patch needs improvement:  0          |
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
Changes (by russellm):

 * status:  reopened => closed
 * resolution:   => wontfix


Comment:

 No, the limitation isn't moronic. As I have now said *twice*, it exists
 *for a very good reason*.

 The solution you propose isn't viable because it introduces an
 inconsistency between the way tables work during a test case and the way
 they work in production. Essentially, you're suggesting that whenever I
 have a test that utilizes the table with raw SQL modifications/inserts, I
 need to remember that it also needs the custom_types sql to be defined.
 This is a pretty egregious violation of DRY.

 The only real solution to this that I can see was alluded to in the
 discussion on #14661 -- that is, introducing a type of custom SQL that can
 be used for DDL modifications. However, what I *haven't* seen is an
 elegant way to introduce this feature.

 Please don't reopen this ticket again. If you feel strongly about this
 idea, take it to django-developers for discussion.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/16550#comment:5>
Django <https://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