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