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