From ad331a42eddbb54c1c2eba70c41aeab0ecfe43c4 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 7 Aug 2018 11:54:43 -0400 Subject: [PATCH 1/5] Create a ConversionHost table --- .../20180807153714_add_conversion_host_table.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 db/migrate/20180807153714_add_conversion_host_table.rb diff --git a/db/migrate/20180807153714_add_conversion_host_table.rb b/db/migrate/20180807153714_add_conversion_host_table.rb new file mode 100644 index 000000000..84edc94f5 --- /dev/null +++ b/db/migrate/20180807153714_add_conversion_host_table.rb @@ -0,0 +1,13 @@ +class AddConversionHostTable < ActiveRecord::Migration[5.0] + def change + create_table :conversion_hosts do |t| + t.string :name + t.string :address + t.string :type + t.string :resource_type + t.bigint :resource_id + t.timestamps + t.index %w(resource_id resource_type) + end + end +end From 18fa6ec458c735e4fb49ebcbd3286d9454bbdfca Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Thu, 9 Aug 2018 12:00:13 -0400 Subject: [PATCH 2/5] Add version and concurrent tasks --- .../20180807153714_add_conversion_host_table.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/db/migrate/20180807153714_add_conversion_host_table.rb b/db/migrate/20180807153714_add_conversion_host_table.rb index 84edc94f5..508496deb 100644 --- a/db/migrate/20180807153714_add_conversion_host_table.rb +++ b/db/migrate/20180807153714_add_conversion_host_table.rb @@ -1,11 +1,13 @@ class AddConversionHostTable < ActiveRecord::Migration[5.0] def change create_table :conversion_hosts do |t| - t.string :name - t.string :address - t.string :type - t.string :resource_type - t.bigint :resource_id + t.string :name + t.string :address + t.string :type + t.string :resource_type + t.bigint :resource_id + t.string :version + t.integer :max_concurrent_tasks t.timestamps t.index %w(resource_id resource_type) end From c395b51a88f5b83a59930cf8a14a96331b742190 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 14 Aug 2018 09:16:13 -0400 Subject: [PATCH 3/5] Add a serialized capabilities column --- db/migrate/20180807153714_add_conversion_host_table.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/migrate/20180807153714_add_conversion_host_table.rb b/db/migrate/20180807153714_add_conversion_host_table.rb index 508496deb..7432bccee 100644 --- a/db/migrate/20180807153714_add_conversion_host_table.rb +++ b/db/migrate/20180807153714_add_conversion_host_table.rb @@ -8,6 +8,7 @@ def change t.bigint :resource_id t.string :version t.integer :max_concurrent_tasks + t.text :capabilities t.timestamps t.index %w(resource_id resource_type) end From 8fc7012f983793a3289ab8197ad5266751c661ca Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 14 Aug 2018 10:09:48 -0400 Subject: [PATCH 4/5] Use .references for polymorphic resource --- .../20180807153714_add_conversion_host_table.rb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/db/migrate/20180807153714_add_conversion_host_table.rb b/db/migrate/20180807153714_add_conversion_host_table.rb index 7432bccee..a21b1f915 100644 --- a/db/migrate/20180807153714_add_conversion_host_table.rb +++ b/db/migrate/20180807153714_add_conversion_host_table.rb @@ -1,14 +1,13 @@ class AddConversionHostTable < ActiveRecord::Migration[5.0] def change create_table :conversion_hosts do |t| - t.string :name - t.string :address - t.string :type - t.string :resource_type - t.bigint :resource_id - t.string :version - t.integer :max_concurrent_tasks - t.text :capabilities + t.string :name + t.string :address + t.string :type + t.references :resource, :type => :bigint, :polymorphic => true + t.string :version + t.integer :max_concurrent_tasks + t.text :capabilities t.timestamps t.index %w(resource_id resource_type) end From cf1a4890a5388c75824b62f4abfff302290f7487 Mon Sep 17 00:00:00 2001 From: Adam Grare Date: Tue, 14 Aug 2018 10:12:24 -0400 Subject: [PATCH 5/5] Add VDDK/SSH transport supported columns --- db/migrate/20180807153714_add_conversion_host_table.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/migrate/20180807153714_add_conversion_host_table.rb b/db/migrate/20180807153714_add_conversion_host_table.rb index a21b1f915..46e484071 100644 --- a/db/migrate/20180807153714_add_conversion_host_table.rb +++ b/db/migrate/20180807153714_add_conversion_host_table.rb @@ -7,7 +7,8 @@ def change t.references :resource, :type => :bigint, :polymorphic => true t.string :version t.integer :max_concurrent_tasks - t.text :capabilities + t.boolean :vddk_transport_supported + t.boolean :ssh_transport_supported t.timestamps t.index %w(resource_id resource_type) end