end
end
- begin
- add_index :active_rules, [:profile_id, :rule_id], :name => 'uniq_profile_rule_ids', :unique => true
- rescue
- # already exists
- end
+ add_index :active_rules, [:profile_id, :rule_id], :name => 'uniq_profile_rule_ids', :unique => true
end
end
class AddIndexOnSnapshotDataResourceId < ActiveRecord::Migration
def self.up
- begin
- add_index :snapshot_data, :resource_id, :name => 'snap_data_resource_id'
- rescue
- # already exists
- end
+ add_index :snapshot_data, :resource_id, :name => 'snap_data_resource_id'
end
end