Sha256: bd072f68850ae5735967ff71b35a80f1cfac12c34d30e5c7b622e03d2f03eb55
Contents?: true
Size: 1012 Bytes
Versions: 14
Compression:
Stored size: 1012 Bytes
Contents
# This migration comes from inkwell (originally 20130202130030) class ChangeIsCommentToItemType < ActiveRecord::Migration def change add_column :inkwell_blog_items, :item_type, :string ::Inkwell::BlogItem.where(:is_comment => true).update_all(:item_type => 'c') ::Inkwell::BlogItem.where(:is_comment => false).update_all(:item_type => 'p') remove_column :inkwell_blog_items, :is_comment add_column :inkwell_favorite_items, :item_type, :string ::Inkwell::FavoriteItem.where(:is_comment => true).update_all(:item_type => 'c') ::Inkwell::FavoriteItem.where(:is_comment => false).update_all(:item_type => 'p') remove_column :inkwell_favorite_items, :is_comment add_column :inkwell_timeline_items, :item_type, :string ::Inkwell::TimelineItem.where(:is_comment => true).update_all(:item_type => 'c') ::Inkwell::TimelineItem.where(:is_comment => false).update_all(:item_type => 'p') remove_column :inkwell_timeline_items, :is_comment end end
Version data entries
14 entries across 7 versions & 1 rubygems