diff options
Diffstat (limited to 'db/migrate/20170930213633_rename_revision_hold_item.rb')
-rw-r--r-- | db/migrate/20170930213633_rename_revision_hold_item.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/db/migrate/20170930213633_rename_revision_hold_item.rb b/db/migrate/20170930213633_rename_revision_hold_item.rb index b2ff736..e4fdbf0 100644 --- a/db/migrate/20170930213633_rename_revision_hold_item.rb +++ b/db/migrate/20170930213633_rename_revision_hold_item.rb | |||
@@ -1,7 +1,9 @@ | |||
1 | class RenameRevisionHoldItem < ActiveRecord::Migration[5.1] | 1 | class RenameRevisionHoldItem < ActiveRecord::Migration[5.1] |
2 | def change | 2 | def change |
3 | remove_column :pokeviewer_revisions, :hold_item, :integer | ||
4 | |||
3 | change_table :pokeviewer_revisions do |t| | 5 | change_table :pokeviewer_revisions do |t| |
4 | t.rename :hold_item, :item_id | 6 | t.integer :item_id |
5 | end | 7 | end |
6 | 8 | ||
7 | add_foreign_key :pokeviewer_revisions, :pokeviewer_items, column: :item_id | 9 | add_foreign_key :pokeviewer_revisions, :pokeviewer_items, column: :item_id |