20150731123114_add_status_to_pods.rb 523 Bytes
Newer Older
1
class AddStatusToPods < ActiveRecord::Migration[4.2]
2 3 4 5 6 7 8 9 10 11 12 13 14
  def change
    add_column :pods, :status, :integer, default: 0
    add_column :pods, :checked_at, :datetime, default: Time.zone.at(0)
    add_column :pods, :offline_since, :datetime, default: nil
    add_column :pods, :response_time, :integer, default: -1
    add_column :pods, :software, :string, limit: 255
    add_column :pods, :error, :string, limit: 255

    add_index :pods, :status
    add_index :pods, :checked_at
    add_index :pods, :offline_since
  end
end