Currently, the indexes created via Laravel migrations (using Blueprint) seem to exclusively use btree, and I can find no documented way to override this behavior. ~I propose adding a second, optional parameter to the index, unique, etc calls that change the type of index algorithm to be specified in the USING clause.~ After some more searching, I found that the index method does accept an algorithm param, but its behavior is nowhere documented. I propose documenting what the algorithm parameter actually does.
The rationale for this is that some inserts will fail when the data to be inserted into a jsonb column exceeds the limits of a btree index. I will need to experiment with gin and gist index algorithms, but I am unsure if the Schema Blueprint system can handle this due to lack of documentation on the algorithm parameter.
Currently, the indexes created via Laravel migrations (using Blueprint) seem to exclusively use
btree
, and I can find no documented way to override this behavior. ~I propose adding a second, optional parameter to theindex
,unique
, etc calls that change the type of index algorithm to be specified in theUSING
clause.~ After some more searching, I found that theindex
method does accept analgorithm
param, but its behavior is nowhere documented. I propose documenting what thealgorithm
parameter actually does.The rationale for this is that some inserts will fail when the data to be inserted into a jsonb column exceeds the limits of a
btree
index. I will need to experiment withgin
andgist
index algorithms, but I am unsure if the Schema Blueprint system can handle this due to lack of documentation on thealgorithm
parameter.