mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Add heartbeat model, next_heartbeat_time and update_heartbeat_time on device registration
This commit is contained in:
9
db/migrate/20151109071857_create_heartbeats.rb
Normal file
9
db/migrate/20151109071857_create_heartbeats.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateHeartbeats < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :heartbeats do |t|
|
||||
t.references :device, index: true, foreign_key: true
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddHeartbeatsDetailsToDevices < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :devices, :heartbeats_count, :integer, default: 0
|
||||
add_column :devices, :last_heartbeat_recd_time, :datetime
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user