about summary refs log tree commit diff stats
path: root/db/migrate/20171015171554_rename_revision_hold_item.pokeviewer.rb
blob: 7b4f781c7aa3fc98e0e56e78e3975cc51d70b822 (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.references :item
    end

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