mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Add OS version and Client Version to device
This commit is contained in:
@@ -19,6 +19,11 @@ class DevicesController < ApplicationController
|
|||||||
private
|
private
|
||||||
|
|
||||||
def device_params
|
def device_params
|
||||||
params.require(:device).permit(:model, :unique_id, :imei_number,:gcm_token)
|
params.require(:device).permit(:model,
|
||||||
|
:unique_id,
|
||||||
|
:imei_number,
|
||||||
|
:gcm_token,
|
||||||
|
:os_version,
|
||||||
|
:client_version)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class AddClientVersionAndOsVersionToDevices < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :devices, :client_version, :string
|
||||||
|
add_column :devices, :os_version, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20151113140645) do
|
ActiveRecord::Schema.define(version: 20151118101616) do
|
||||||
|
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
@@ -74,6 +74,8 @@ ActiveRecord::Schema.define(version: 20151113140645) do
|
|||||||
t.integer "heartbeats_count", default: 0
|
t.integer "heartbeats_count", default: 0
|
||||||
t.datetime "last_heartbeat_recd_time"
|
t.datetime "last_heartbeat_recd_time"
|
||||||
t.string "gcm_token"
|
t.string "gcm_token"
|
||||||
|
t.string "client_version"
|
||||||
|
t.string "os_version"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "heartbeats", force: :cascade do |t|
|
create_table "heartbeats", force: :cascade do |t|
|
||||||
|
|||||||
@@ -3,5 +3,8 @@ FactoryGirl.define do
|
|||||||
model "LGE - Nexus 5"
|
model "LGE - Nexus 5"
|
||||||
unique_id "aa55589dd10a8819"
|
unique_id "aa55589dd10a8819"
|
||||||
gcm_token "dAJukxHtV84iij0z5PJruUhcNnQSOl7NdeAWS9Y45UVhPoG1wRGp7i2Hp34SyrodDfdZieeDzbPusqYyFuEB_vAUl5EDyYqFdzMNF1JpN2ThkEl_dTawWP9F9rSsNadV1HZ"
|
gcm_token "dAJukxHtV84iij0z5PJruUhcNnQSOl7NdeAWS9Y45UVhPoG1wRGp7i2Hp34SyrodDfdZieeDzbPusqYyFuEB_vAUl5EDyYqFdzMNF1JpN2ThkEl_dTawWP9F9rSsNadV1HZ"
|
||||||
|
imei_number "867124023273477"
|
||||||
|
os_version "4.4"
|
||||||
|
client_version "1.05"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user