Skip to content

Instantly share code, notes, and snippets.

@oogali
Created August 17, 2012 15:24
Show Gist options
  • Save oogali/3379857 to your computer and use it in GitHub Desktop.
Save oogali/3379857 to your computer and use it in GitHub Desktop.
indexes via AR migrations
class AddIndexesToAlertsTable < ActiveRecord::Migration
def self.up
add_index :alerts, [ :signature ]
end
def self.down
remove_index :alerts, [ :signature ]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment