#32376: Allow destroy_test_db not to fail if database doesn't exist
---------------------------------------------+------------------------
               Reporter:  Mateusz Mandera    |          Owner:  nobody
                   Type:  New feature        |         Status:  new
              Component:  Testing framework  |        Version:  3.1
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 **The situation**
 In our test setup we directly call `connection.creation.destroy_test_db`
 and the database that's meant to be dropped may or may not exist - the
 latter scenario is completely okay and shouldn't fail

 **The Problem**
 _destroy_test_db uses `DROP DATABASE` query, meaning an exception is
 thrown if the database doesn't exist

 **A possible solution**
 destroy_test_db could take an additional optional argument, which if True,
 would cause `IF EXISTS` to be used in the query.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32376>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/057.fd5e22ba4e3634d9a7350a7740322605%40djangoproject.com.

Reply via email to