about summary refs log tree commit diff stats
path: root/db/migrate/20170930213633_rename_revision_hold_item.rb
blob: 4060b9bcc5f201b32a88c3358de9509e6112b7de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
class RenameRevisionHoldItem < ActiveRecord::Migration[5.1]
  def change
    remove_column :revisions, :hold_item, :integer

    change_table :revisions do |t|
      t.references :item
    end

    add_foreign_key :revisions, :items, column: :item_id
  end
end