mirror of
http://ghproxy.cn/https://github.com/multunus/onemdm-server
synced 2025-12-06 10:14:59 +00:00
Added Models App, Installation Batch Installation
This commit is contained in:
10
db/migrate/20151113123015_create_applications.rb
Normal file
10
db/migrate/20151113123015_create_applications.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class CreateApplications < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :applications do |t|
|
||||
t.string :name
|
||||
t.string :package_name
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
5
db/migrate/20151113124226_rename_application_to_app.rb
Normal file
5
db/migrate/20151113124226_rename_application_to_app.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
class RenameApplicationToApp < ActiveRecord::Migration
|
||||
def change
|
||||
rename_table :applications, :apps
|
||||
end
|
||||
end
|
||||
9
db/migrate/20151113131647_create_batch_installations.rb
Normal file
9
db/migrate/20151113131647_create_batch_installations.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class CreateBatchInstallations < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :batch_installations do |t|
|
||||
t.integer :app_id
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
11
db/migrate/20151113132152_create_installations.rb
Normal file
11
db/migrate/20151113132152_create_installations.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class CreateInstallations < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :installations do |t|
|
||||
t.integer :device_id
|
||||
t.integer :batch_installation_id
|
||||
t.integer :status
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class ChangeStatusDataTypeFromStringToIntegerInInstallation < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :installations, :status, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user