class AddCategoryIdToItems < ActiveRecord::Migration[5.0]
  def change
    add_column :items, :category_id, :text, :array => true, :default => '{}'
  end
end

class AddCategoryIdToItems < ActiveRecord::Migration[5.0]
  def change
    add_column :items, :category_id, :text, :array => true, :default => [].to_yaml
  end
end

Update migration and include .to_yaml after
Update migration and include .to_yaml after []
