From a29b86011d9c53709279d125f4501140c17ccc1e Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Oct 2017 14:16:11 -0400 Subject: Changed the way that the hold item column is migrated MySQL seems to choke on the previous way that the hold_item column became the item_id column; since this is an old migration and would only be run retroactively anyway, we can change this to just dropping the hold_item column and adding the item_id column. --- db/migrate/20170930213633_rename_revision_hold_item.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'db') 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 @@ class RenameRevisionHoldItem < ActiveRecord::Migration[5.1] def change + remove_column :pokeviewer_revisions, :hold_item, :integer + change_table :pokeviewer_revisions do |t| - t.rename :hold_item, :item_id + t.integer :item_id end add_foreign_key :pokeviewer_revisions, :pokeviewer_items, column: :item_id -- cgit 1.4.1