我正在尝试使用Postgres 9.6在Rails中的UUID数组上添加索引。这是我的迁移...
class AddProductIdsToApplications < ActiveRecord::Migration[5.2]
def change
add_column :applications, :product_ids, :uuid, array: true, default: []
add_index :applications, :product_ids, using: 'gin'
end
end
我遇到此错误...
> PG::UndefinedObject: ERROR: data type uuid[] has no default operator class for access method "gin"
> HINT: You must specify an operator class for the index or define a default operator class for the data type.
是否有针对此的迁移修复程序?