Chris@0: class AddMissingIndexesToAttachments < ActiveRecord::Migration Chris@0: def self.up Chris@0: add_index :attachments, [:container_id, :container_type] Chris@0: add_index :attachments, :author_id Chris@0: end Chris@0: Chris@0: def self.down Chris@0: remove_index :attachments, :column => [:container_id, :container_type] Chris@0: remove_index :attachments, :author_id Chris@0: end Chris@0: end