Skip to content

Commit

Permalink
Add missing down migration to put the tables back.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Oct 23, 2021
1 parent 2d0539a commit 19e83a1
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions db/migrate/20211022193626_remove_migration_feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,52 @@ def up
drop_table :transformation_mappings
drop_table :transformation_mapping_items
end

def down
# TODO: Verify this... taken straight from schema.rb

create_table "conversion_hosts", comment: "Conversion Hosts", force: :cascade do |t|
t.string "name", comment: "A symbolic name for the conversion host."
t.string "address", comment: "The IP address for the conversion host. If present, must be one of the associated resource's IP addresses."
t.string "type", comment: "The STI type of the conversion host."
t.string "resource_type", comment: "The STI type of the associated resource."
t.bigint "resource_id", comment: "The ID of the associated resource."
t.string "version", comment: "The version of the v2v conversion tool on the conversion host."
t.integer "max_concurrent_tasks", comment: "The maximum number of concurrent tasks for the conversion host to be considered eligible."
t.boolean "vddk_transport_supported", comment: "Indicates whether or not vddk transport is supported from the appliance to the conversion host."
t.boolean "ssh_transport_supported", comment: "Indicates whether or not ssh transport is supported from the appliance to the conversion host."
t.datetime "created_at", null: false, comment: "The timestamp the conversion host was added to the app inventory."
t.datetime "updated_at", null: false, comment: "The timestamp the conversion host was last updated within the appliance."
t.string "concurrent_transformation_limit", comment: "The maximum number of concurrent transformation tasks the conversion host may undertake."
t.string "cpu_limit", comment: "The CPU percentage limit that the conversion host may use."
t.string "memory_limit", comment: "The memory limit (in mb) that the conversion host may use."
t.string "network_limit", comment: "The maximum network (bandwidth) usage that the conversion host may use."
t.string "blockio_limit", comment: "The block I/O (disk) limit that the conversion host may use."
t.index ["resource_id", "resource_type"], name: "index_conversion_hosts_on_resource_id_and_resource_type"
t.index ["resource_type", "resource_id"], name: "index_conversion_hosts_on_resource_type_and_resource_id"
end

create_table "transformation_mappings", force: :cascade do |t|
t.string "name"
t.string "description"
t.string "comments"
t.string "state"
t.jsonb "options", default: {}
t.bigint "tenant_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end

create_table "transformation_mapping_items", force: :cascade do |t|
t.bigint "source_id"
t.string "source_type"
t.bigint "destination_id"
t.string "destination_type"
t.bigint "transformation_mapping_id"
t.jsonb "options", default: {}
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["transformation_mapping_id"], name: "index_transformation_mapping_items_on_transformation_mapping_id"
end
end
end

0 comments on commit 19e83a1

Please sign in to comment.