mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-01 21:47:16 +00:00
14 lines
415 B
Ruby
14 lines
415 B
Ruby
class FixProblematicIndexNames < ActiveRecord::Migration
|
|
def up
|
|
begin
|
|
remove_index :preferences, :name => 'index_preferences_on_owner_and_attribute_and_preference'
|
|
rescue ArgumentError
|
|
# ignore - already remove then
|
|
end
|
|
add_index :preferences, [:owner_id, :owner_type, :name, :group_id, :group_type], :name => 'ix_prefs_on_owner_attr_pref', :unique => true
|
|
end
|
|
|
|
def down
|
|
end
|
|
end
|