#29717: Provide a way for tests to run on an existing empty DB
-------------------------------------+-------------------------------------
               Reporter:  Curtis     |          Owner:  nobody
  Maloney                            |
                   Type:  New        |         Status:  new
  feature                            |
              Component:  Database   |        Version:  2.1
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  1
  Unreviewed                         |
    Needs documentation:  1          |    Needs tests:  1
Patch needs improvement:  1          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Periodically users ask in IRC for help running tests when the user they
 connect as can not create a DB.

 The reasons for this situation tend to be their DBA won't allow it, or
 their corporate policy doesn't permit it.

 Regardless, Django fails because when not using keepdb, it attempts to
 create the db _always_, and only catches "duplicate DB name" errors to
 indicate it already exists.

 However, Postgres checks for CREATE DB permissions _before_ checking if
 the DB exists, so Django sees it as a generic "DB creation problem" and
 bails.

 If we, instead, used the existing function [used by the keepdb logic] to
 test if the DB exists, we could smooth the path for users in the above
 situation.

 I've started a patch which is currently _very_ wrong, and is awaiting
 feedback as requested on the django-dev mailing list.

 https://github.com/django/django/pull/10349

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29717>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.ac7a9f35dac455634421846c95e306a2%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to