﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33021	Migration crashes when GIN index with gin_trgm_ops is used	Aleksei khatkevich	nobody	"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...
}}}

"	Bug	closed	Database layer (models, ORM)	3.2	Normal	invalid	gin OpClass		Unreviewed	0	0	0	0	0	0
