Add changeset indexes to nodes, ways and relations.
authorTom Hughes <tom@compton.nu>
Mon, 20 Apr 2009 13:39:20 +0000 (13:39 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 20 Apr 2009 13:39:20 +0000 (13:39 +0000)
db/migrate/027_add_changeset_indexes.rb [new file with mode: 0644]

diff --git a/db/migrate/027_add_changeset_indexes.rb b/db/migrate/027_add_changeset_indexes.rb
new file mode 100644 (file)
index 0000000..0d4bba0
--- /dev/null
@@ -0,0 +1,13 @@
+class AddChangesetIndexes < ActiveRecord::Migration
+  def self.up
+    add_index "nodes", ["changeset_id"], :name => "nodes_changeset_id_idx"
+    add_index "ways", ["changeset_id"], :name => "ways_changeset_id_idx"
+    add_index "relations", ["changeset_id"], :name => "relations_changeset_id_idx"
+  end
+
+  def self.down
+    remove_index "relations", :name => "relations_changeset_id_idx"
+    remove_index "ways", :name => "ways_changeset_id_idx"
+    remove_index "nodes", :name => "nodes_changeset_id_idx"
+  end
+end