X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ef7f3d800cbdd49b692df10d312e5fd880e2e938..dd905b5aa893918168c644045aa1b6069e95d48e:/db/migrate/028_add_more_changeset_indexes.rb?ds=inline diff --git a/db/migrate/028_add_more_changeset_indexes.rb b/db/migrate/028_add_more_changeset_indexes.rb index b7b1be955..fcbc24ed7 100644 --- a/db/migrate/028_add_more_changeset_indexes.rb +++ b/db/migrate/028_add_more_changeset_indexes.rb @@ -1,15 +1,17 @@ -require 'migrate' - -class AddMoreChangesetIndexes < ActiveRecord::Migration +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", %w[min_lat max_lat min_lon max_lon], :name => "changesets_bbox_idx", :using => "GIST" end def self.down 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