diaspora/db/migrate/20150731123114_add_status_to_pods.rb
2017-08-12 15:39:26 +02:00

14 lines
523 B
Ruby

class AddStatusToPods < ActiveRecord::Migration[4.2]
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