Class: AddProfileFieldsToUsers

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/tkh_mailing_list/create_or_update_migrations/templates/add_profile_fields_to_users.rb

Instance Method Summary collapse

Instance Method Details

#changeObject

profile attributes



3
4
5
6
7
8
9
10
11
# File 'lib/generators/tkh_mailing_list/create_or_update_migrations/templates/add_profile_fields_to_users.rb', line 3

def change
  add_column :users,  :portrait,             :string
  add_column :users,  :allow_newsletter,     :boolean, default: true
  add_column :users,  :allow_daily_digests,  :boolean, default: true
  add_column :users,  :website_url,          :string
  add_column :users,  :facebook_url,         :string
  add_column :users,  :twitter_handle,       :string
  add_column :users,  :google_plus_url,      :string
end