Skip to content

Commit

Permalink
Merge pull request #5026 from bronaghs/azure_resource_group_db_migrat…
Browse files Browse the repository at this point in the history
…ions

Two migrations for Azure resource groups
  • Loading branch information
Fryguy committed Oct 21, 2015
2 parents 716033e + 0424f27 commit fd11e99
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
15 changes: 15 additions & 0 deletions db/migrate/20151019184531_create_resource_groups.rb
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions db/migrate/20151021151216_add_resource_group_id_to_vms.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit fd11e99

Please sign in to comment.