]> git.openstreetmap.org Git - rails.git/commitdiff
Add timestamp indexes to current_ways and current_relations.
authorTom Hughes <tom@compton.nu>
Sun, 4 May 2008 11:33:09 +0000 (11:33 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 4 May 2008 11:33:09 +0000 (11:33 +0000)
db/migrate/012_add_timestamp_indexes.rb [new file with mode: 0644]

diff --git a/db/migrate/012_add_timestamp_indexes.rb b/db/migrate/012_add_timestamp_indexes.rb
new file mode 100644 (file)
index 0000000..c6b3bc7
--- /dev/null
@@ -0,0 +1,11 @@
+class AddTimestampIndexes < ActiveRecord::Migration
+  def self.up
+    add_index :current_ways, :timestamp, :name => :current_ways_timestamp_idx
+    add_index :current_relations, :timestamp, :name => :current_relations_timestamp_idx
+  end
+
+  def self.down
+    remove_index :current_ways, :name => :current_ways_timestamp_idx
+    remove_index :current_relations, :name => :current_relations_timestamp_idx
+  end
+end