#33773: DEFAULT_INDEX_TABLESPACE setting is ignored for Indexes defined with
multiple fields.
------------------------------+----------------------------------------
     Reporter:  Bruce Cutler  |                    Owner:  Bruce Cutler
         Type:  Bug           |                   Status:  assigned
    Component:  Migrations    |                  Version:  4.0
     Severity:  Normal        |               Resolution:
     Keywords:                |             Triage Stage:  Accepted
    Has patch:  1             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+----------------------------------------

Comment (by Mariusz Felisiak):

 Replying to [comment:4 Bruce Cutler]:
 > [[https://github.com/django/django/pull/15770|PR on github]] raised for
 this patch.
 >
 > No tests were created for the patch, as 3 existing tests already fail
 prior to the changes (and pass since) when DEFAULT_INDEX_TABLESPACE is
 specified in settings:
 > {{{
 > ======================================================================
 > FAIL: test_db_tablespace (model_indexes.tests.IndexesTests) [<object
 object at 0x7f8bcd80fa00>] (fields=['shortcut', 'isbn'])
 > ...
 > AssertionError: '"idx_def_tbsp"' not found in 'create index "" on
 "model_indexes_book" ("shortcut", "isbn")'
 >
 > ======================================================================
 > FAIL: test_db_tablespace (model_indexes.tests.IndexesTests) [<object
 object at 0x7f8bcd80fa00>] (fields=['title', 'author'])
 > ...
 > AssertionError: '"idx_def_tbsp"' not found in 'create index "" on
 "model_indexes_book" ("title", "author")'
 >
 > ======================================================================
 > FAIL: test_func_with_tablespace (model_indexes.tests.IndexesTests)
 > ...
 > AssertionError: '"idx_def_tbsp"' not found in 'CREATE INDEX
 "functional_no_tbls" ON "model_indexes_book" ((LOWER("shortcut")) DESC)'
 > }}}

 Unfortunately it's not covered by CI because we set the same tablespace to
 the `DEFAULT_TABLESPACE` and `DEFAULT_INDEX_TABLESPACE`. Overriding
 `DEFAULT_TABLESPACE` to `None` should make it covered.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33773#comment:6>
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/010701815b760c93-fcec8b4b-9c63-4b68-839e-8b4cffbb2983-000000%40eu-central-1.amazonses.com.

Reply via email to