mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 02:04:57 +00:00
Add GCM push for pushing OneMDM app to devices
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
class CreateApplications < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :applications do |t|
|
||||
create_table :apps do |t|
|
||||
t.string :name
|
||||
t.string :package_name
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
class RenameApplicationToApp < ActiveRecord::Migration
|
||||
def change
|
||||
rename_table :applications, :apps
|
||||
end
|
||||
end
|
||||
@@ -1,8 +1,7 @@
|
||||
class CreateBatchInstallations < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :batch_installations do |t|
|
||||
t.integer :app_id
|
||||
|
||||
t.belongs_to :app, foreign_key: true, index: true
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
class CreateInstallations < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :installations do |t|
|
||||
t.integer :device_id
|
||||
t.integer :batch_installation_id
|
||||
t.integer :status
|
||||
t.belongs_to :device, foreign_key: true, index: true
|
||||
t.belongs_to :batch_installation, foreign_key: true, index: true
|
||||
t.integer :status, default: 0, null: false
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
14
db/schema.rb
14
db/schema.rb
@@ -62,6 +62,8 @@ ActiveRecord::Schema.define(version: 20151113140645) do
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
add_index "batch_installations", ["app_id"], name: "index_batch_installations_on_app_id", using: :btree
|
||||
|
||||
create_table "devices", force: :cascade do |t|
|
||||
t.string "model"
|
||||
t.string "unique_id"
|
||||
@@ -85,10 +87,16 @@ ActiveRecord::Schema.define(version: 20151113140645) do
|
||||
create_table "installations", force: :cascade do |t|
|
||||
t.integer "device_id"
|
||||
t.integer "batch_installation_id"
|
||||
t.integer "status"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "status", default: 0, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
add_index "installations", ["batch_installation_id"], name: "index_installations_on_batch_installation_id", using: :btree
|
||||
add_index "installations", ["device_id"], name: "index_installations_on_device_id", using: :btree
|
||||
|
||||
add_foreign_key "batch_installations", "apps"
|
||||
add_foreign_key "heartbeats", "devices"
|
||||
add_foreign_key "installations", "batch_installations"
|
||||
add_foreign_key "installations", "devices"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user