]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/028_add_more_changeset_indexes.rb
Merge remote-tracking branch 'upstream/pull/5374'
[rails.git] / db / migrate / 028_add_more_changeset_indexes.rb
index d7a6df7abb92050c32fa86355f371785e4bc1b77..fcbc24ed71292123e644ebab9e4792a6a37e09d2 100644 (file)
@@ -1,5 +1,7 @@
 class AddMoreChangesetIndexes < ActiveRecord::Migration[4.2]
   def self.up
 class AddMoreChangesetIndexes < ActiveRecord::Migration[4.2]
   def self.up
+    enable_extension "btree_gist"
+
     add_index "changesets", ["created_at"], :name => "changesets_created_at_idx"
     add_index "changesets", ["closed_at"], :name => "changesets_closed_at_idx"
     add_index "changesets", %w[min_lat max_lat min_lon max_lon], :name => "changesets_bbox_idx", :using => "GIST"
     add_index "changesets", ["created_at"], :name => "changesets_created_at_idx"
     add_index "changesets", ["closed_at"], :name => "changesets_closed_at_idx"
     add_index "changesets", %w[min_lat max_lat min_lon max_lon], :name => "changesets_bbox_idx", :using => "GIST"
@@ -9,5 +11,7 @@ class AddMoreChangesetIndexes < ActiveRecord::Migration[4.2]
     remove_index "changesets", :name => "changesets_bbox_idx"
     remove_index "changesets", :name => "changesets_closed_at_idx"
     remove_index "changesets", :name => "changesets_created_at_idx"
     remove_index "changesets", :name => "changesets_bbox_idx"
     remove_index "changesets", :name => "changesets_closed_at_idx"
     remove_index "changesets", :name => "changesets_created_at_idx"
+
+    disable_extension "btree_gist"
   end
 end
   end
 end