diff --git a/db/migrate/20151019184531_create_resource_groups.rb b/db/migrate/20151019184531_create_resource_groups.rb new file mode 100644 index 00000000000..3a3a4971933 --- /dev/null +++ b/db/migrate/20151019184531_create_resource_groups.rb @@ -0,0 +1,15 @@ +class CreateResourceGroups < ActiveRecord::Migration + def up + create_table :resource_groups do |t| + t.string :name + t.string :ems_ref + t.bigint :ems_id + t.string :type + t.timestamps :null => false + end + end + + def down + drop_table :resource_groups + end +end diff --git a/db/migrate/20151021151216_add_resource_group_id_to_vms.rb b/db/migrate/20151021151216_add_resource_group_id_to_vms.rb new file mode 100644 index 00000000000..ec1daedb2a9 --- /dev/null +++ b/db/migrate/20151021151216_add_resource_group_id_to_vms.rb @@ -0,0 +1,9 @@ +class AddResourceGroupIdToVms < ActiveRecord::Migration + def up + add_column :vms, :resource_group_id, :bigint + end + + def down + remove_column :vms, :resource_group_id + end +end