Sha256: ee5c51cb0423b61f608d54238e889ffe35d4ebf8f85e3eda25eeef4b60384b51

Contents?: true

Size: 933 Bytes

Versions: 6

Compression:

Stored size: 933 Bytes

Contents

class ChangeCommunityTableForAddingTypesAndUserAccess < ActiveRecord::Migration
  def change
    if ::Inkwell::Engine::config.respond_to?('community_table')
      add_column ::Inkwell::Engine::config.community_table, :default_user_access, :string, :default => 'w'
      add_column ::Inkwell::Engine::config.community_table, :writers_ids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.community_table, :banned_ids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.community_table, :muted_ids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.community_table, :invitations_uids, :text, :default => '[]'
      add_column ::Inkwell::Engine::config.community_table, :public, :boolean, :default => true
      rename_column ::Inkwell::Engine::config.user_table, :communities_ids, :communities_info
      remove_column ::Inkwell::Engine::config.user_table, :admin_of
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
inkwell-2.0.0 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb
inkwell-1.5.2 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb
inkwell-1.5.1 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb
inkwell-1.4.1 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb
inkwell-1.2.0 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb
inkwell-1.1.7 db/migrate/20130212130878_change_community_table_for_adding_types_and_user_access.rb