Sha256: cba6fbb67005a94797e57d8fa84067f9a682be887430a25c4b64fcedd8538396

Contents?: true

Size: 1.23 KB

Versions: 16

Compression:

Stored size: 1.23 KB

Contents

# This migration comes from inkwell (originally 20130202130010)
class ChangeTablesForCommunities < ActiveRecord::Migration
  def change
    change_column :inkwell_comments, :users_ids_who_favorite_it, :text, :default => '[]'
    change_column :inkwell_comments, :users_ids_who_comment_it, :text, :default => '[]'
    change_column :inkwell_comments, :users_ids_who_reblog_it, :text, :default => '[]'
    remove_column :inkwell_blog_items, "#{::Inkwell::Engine::config.user_table.to_s.singularize}_id"
    add_column :inkwell_blog_items, :owner_id, :integer
    add_column :inkwell_blog_items, :is_owner_user, :boolean
    change_column :inkwell_timeline_items, :from_source, :text, :default => '[]', :limit => nil

    if ::Inkwell::Engine::config.respond_to?('community_table')
      add_column ::Inkwell::Engine::config.community_table, :users_ids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.community_table, :admins_info, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.user_table, :communities_ids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.user_table, :admin_of, :text, :default => '[]'

      add_column ::Inkwell::Engine::config.community_table, :owner_id, :integer
    end
  end
end

Version data entries

16 entries across 8 versions & 1 rubygems

Version Path
inkwell-2.0.0 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-2.0.0 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.5.2 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.5.2 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.5.1 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.5.1 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.4.1 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.4.1 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.2.0 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.2.0 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.1.7 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.1.7 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.1.1 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb
inkwell-1.1.1 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.0.5 test/dummy_without_community/db/migrate/20130208134749_change_tables_for_communities.inkwell.rb
inkwell-1.0.5 test/dummy/db/migrate/20130208134954_change_tables_for_communities.inkwell.rb