Удаляю так:
remove_index :price_crosses, name: :price_crosses_oem_make_name_cross_oem_cross_make_name_key
А пишет:
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
PG::DependentObjectsStillExist: ERROR: cannot drop index price_crosses_oem_make_name_cross_oem_cross_make_name_key because constraint price_crosses_oem_make_name_cross_oem_cross_make_name_key on table price_crosses requires it
HINT: You can drop constraint price_crosses_oem_make_name_cross_oem_cross_make_name_key on table price_crosses instead.
: DROP INDEX "price_crosses_oem_make_name_cross_oem_cross_make_name_key"
/home/woto/work/eldar/allzap/apps/www/db/migrate/9011090606662959_remove_index_from_price_crosses.rb:3:in `change'
script/rails:6:in `require'
script/rails:6:in `'
Caused by:
ActiveRecord::StatementInvalid: PG::DependentObjectsStillExist: ERROR: cannot drop index price_crosses_oem_make_name_cross_oem_cross_make_name_key because constraint price_crosses_oem_make_name_cross_oem_cross_make_name_key on table price_crosses requires it
HINT: You can drop constraint price_crosses_oem_make_name_cross_oem_cross_make_name_key on table price_crosses instead.
: DROP INDEX "price_crosses_oem_make_name_cross_oem_cross_make_name_key"
/home/woto/work/eldar/allzap/apps/www/db/migrate/9011090606662959_remove_index_from_price_crosses.rb:3:in `change'