Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding index on ips.date

  • Loading branch information...
commit f752f8c0482659ffa138a4dcf36c3cb759380a4d 1 parent 5732efe
Winton Welsh authored October 28, 2010
3  db/migrate/011_requests_indexes.rb
@@ -5,6 +5,7 @@ def self.up
5 5
   end
6 6
 
7 7
   def self.down
8  
-    drop_table :requests_indexes
  8
+    remove_index :requests, :identifier
  9
+    remove_index :requests, :ip
9 10
   end
10 11
 end
9  db/migrate/012_ips_indexes.rb
... ...
@@ -0,0 +1,9 @@
  1
+class IpsIndexes < ActiveRecord::Migration
  2
+  def self.up
  3
+    add_index :ips, :date
  4
+  end
  5
+
  6
+  def self.down
  7
+    remove_index :ips, :date
  8
+  end
  9
+end

0 notes on commit f752f8c

Please sign in to comment.
Something went wrong with that request. Please try again.