Commit e6ad01b5 by ivan Lan

Let AutoStation use index name

parent d626d089
...@@ -20,7 +20,7 @@ class CreateTenMinAutoStations < ActiveRecord::Migration[5.0] ...@@ -20,7 +20,7 @@ class CreateTenMinAutoStations < ActiveRecord::Migration[5.0]
end end
add_index :auto_station_ten_mins, :datetime add_index :auto_station_ten_mins, :datetime
add_index :auto_station_ten_mins, :sitenumber add_index :auto_station_ten_mins, :name
end end
def down def down
......
...@@ -21,7 +21,7 @@ module WeatherModel ...@@ -21,7 +21,7 @@ module WeatherModel
pressure: :string, pressure: :string,
}, },
options: { options: {
index: %i[datetime sitenumber], index: %i[datetime name],
expire: 4 * 60 * 60, expire: 4 * 60 * 60,
unique: nil, unique: nil,
father: nil, father: nil,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment