add geolocation search for public channels

This commit is contained in:
Lee Lawlor
2014-08-05 15:12:41 -04:00
parent 6d2d9f2b17
commit 2125d714e6
10 changed files with 64 additions and 1 deletions

View File

@ -0,0 +1,6 @@
class AddGeolocationIndexToChannels < ActiveRecord::Migration
def change
add_index :channels, [:latitude, :longitude]
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140801191621) do
ActiveRecord::Schema.define(version: 20140804223739) do
create_table "active_admin_comments", force: true do |t|
t.string "namespace"
@ -107,6 +107,7 @@ ActiveRecord::Schema.define(version: 20140801191621) do
t.text "metadata"
end
add_index "channels", ["latitude", "longitude"], name: "index_channels_on_latitude_and_longitude", using: :btree
add_index "channels", ["public_flag", "last_entry_id", "updated_at"], name: "channels_public_viewable", using: :btree
add_index "channels", ["ranking", "updated_at"], name: "index_channels_on_ranking_and_updated_at", using: :btree
add_index "channels", ["realtime_io_serial_number"], name: "index_channels_on_realtime_io_serial_number", using: :btree