1 class AddImageUseGravatarToUsers < ActiveRecord::Migration[5.0]
3 add_column :users, :image_use_gravatar, :boolean, :null => false, :default => false
5 # For people who don't have images on osm.org, enable Gravatar.
6 User.where(:image_file_name => nil).update_all(:image_use_gravatar => true)
8 change_column_default :users, :image_use_gravatar, true
12 remove_column :users, :image_use_gravatar