Sha256: 9241043797f8fcdb5dd081367b6d5b3a4d01111760c5b2de4c0458fb018af931

Contents?: true

Size: 326 Bytes

Versions: 7

Compression:

Stored size: 326 Bytes

Contents

class FixPromotionCodeAndPathUniqueIndexes < ActiveRecord::Migration[5.2]
  def change
    # removing unique indexes
    remove_index :spree_promotions, :code
    # applying standard indexes
    add_index :spree_promotions, :code
    add_index :spree_promotions, :path unless index_exists?(:spree_promotions, :path)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
spree_core-4.3.3 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.2 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.1 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.0 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.0.rc3 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.0.rc2 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb
spree_core-4.3.0.rc1 db/migrate/20210730154425_fix_promotion_code_and_path_unique_indexes.rb