X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/11cc4a5e601dd288d601e6e35a72d159062f18b5..0bbfe922eadabac6ca753e0a6d2e2410c69eae54:/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 3a5e941ed..fcbc24ed7 100644 --- a/db/migrate/028_add_more_changeset_indexes.rb +++ b/db/migrate/028_add_more_changeset_indexes.rb @@ -1,7 +1,7 @@ -require "migrate" - 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" @@ -11,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" + + disable_extension "btree_gist" end end