about summary refs log tree commit diff stats
path: root/db/migrate/20171015171554_rename_revision_hold_item.pokeviewer.rb
blob: d83f5e8fc53dd5f910aa4c0c97031a8af3ff56b8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# This migration comes from pokeviewer (originally 20170930213633)
class RenameRevisionHoldItem < ActiveRecord::Migration[5.1]
  def change
    remove_column :pokeviewer_revisions, :hold_item, :integer

    change_table :pokeviewer_revisions do |t|
      t.integer :item_id
    end

    add_foreign_key :pokeviewer_revisions, :pokeviewer_items, column: :item_id
  end
end