ManageIQ/manageiq — pull request #1170 by jrafanie (2014-12-03 20:39:32+00:00)
Title: Convert remaining *_id columns to 64 bit

Note: Performing a change_column on a column with an index is expensive, so
we drop the index if it exists beforehand and add it back unconditionally after.
The latter also fixes the *_id columns missing indexes, such as cloud_volumes.

How to locate 32 bit *_id columns:
`grep -En "create_table|integer.+_id\b" db/schema.rb | grep -v ":limit => 8"`

Modeled after: db/migrate/20100621174417_convert_ids_to64bit.rb

cc @Fryguy @tenderlove @gmcculloug @bzwei @blomquisg @brandondunne @mkanoor @roliveri @lfu
New migrations should be created so that your schema.rb shows `:limit => 8` for references (*_id) and `:bigserial` for id columns.

For example:
```
create_table "vms", id: :bigserial, :force => true do |t|
...
t.integer "host_id", :limit => 8
t.integer "storage_id", :limit => 8
...
t.integer "ems_id", :limit => 8
```