У меня есть скрипт переноса БД в ruby.
Как добавить предложение where в сценарий миграции
unless index_exists?(:hotel_room_types, [:hotel_id, :dynamic_price_from])
add_index :hotel_room_types, [:hotel_id, :dynamic_price_from],
unique: true, where: (status =1), name: 'by_hotel_id_from'
end
PG::DatatypeMismatch: ERROR: argument of WHERE must be type boolean, not type integer
LINE 1: ... otel_room_types "(" hotel_id "," dynamic_price_from ") WHERE 1