core/db/migrate/20240303174340_fix_spree_stock_item_unique_index.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method change has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def change
    remove_index :spree_stock_items, name: 'stock_item_by_loc_var_id_deleted_at' if index_exists?(:spree_stock_items, [:stock_location_id, :variant_id], name: 'stock_item_by_loc_var_id_deleted_at')

    unless index_exists?(:spree_stock_items, ['variant_id', 'stock_location_id'], name: 'index_spree_stock_items_unique_without_deleted_at')
      # MySQL doesn't support partial indexes
Severity: Minor
Found in core/db/migrate/20240303174340_fix_spree_stock_item_unique_index.rb - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status