#33021: Migration crashes when GIN index with gin_trgm_ops is used
---------------------------------------------+-----------------------------
               Reporter:  AlekseiKhatkevich  |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  Migrations         |        Version:  3.2
               Severity:  Normal             |       Keywords:  gin OpClass
           Triage Stage:  Unreviewed         |      Has patch:  0
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+-----------------------------
 I have an index like following:


 {{{
 GinIndex(
                 OpClass(Upper('text_id'), name='gin_trgm_ops'),
                 name='text_id_idx',
             ),
 }}}

 Migration file creates without any troubles on it.

 sqlmigrate generates following SQL:



 {{{
 CREATE INDEX "text_id_idx" ON "auction_lot" USING gin ((UPPER("text_id")
 gin_trgm_ops));
 }}}

 which obviously has one extra set of (), which causes following exception
 during migration


 {{{
 django.db.utils.ProgrammingError: syntax error at or near "gin_trgm_ops"
 LINE 1: ...dx" ON "auction_lot" USING gin ((UPPER("text_id") gin_trgm_o...
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33021>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/060.04acc97b0ab21befffa3921c0665b46b%40djangoproject.com.

Reply via email to