Add some extra indexes.
authorTom Hughes <tom@compton.nu>
Fri, 12 Dec 2008 15:43:02 +0000 (15:43 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 12 Dec 2008 15:43:02 +0000 (15:43 +0000)
db/migrate/017_add_gpx_indexes.rb [new file with mode: 0644]

diff --git a/db/migrate/017_add_gpx_indexes.rb b/db/migrate/017_add_gpx_indexes.rb
new file mode 100644 (file)
index 0000000..1778dcc
--- /dev/null
@@ -0,0 +1,11 @@
+class AddGpxIndexes < ActiveRecord::Migration
+  def self.up
+    add_index "gpx_files", ["user_id"], :name => "gpx_files_user_id_idx"
+    add_index "gpx_file_tags", ["tag"], :name => "gpx_file_tags_tag_idx"
+  end
+
+  def self.down
+    remove_index "gpx_file_tags", :name => "gpx_file_tags_tag_idx"
+    remove_index "gpx_files", :name => "gpx_files_user_id_idx"
+  end
+end