Sha256: 101d638b62ffb93451c7efeedec5b3ac369662e8fd7e6df453b982af315c70d5

Contents?: true

Size: 363 Bytes

Versions: 16

Compression:

Stored size: 363 Bytes

Contents

class MoveUsersUnfuddleIdToProps < ActiveRecord::Migration
  def up
    require "progressbar"
    users = User.all
    pbar = ProgressBar.new("users", users.count)
    users.find_each do |user|
      if unfuddle_id = user.read_attribute(:unfuddle_id)
        user.update_prop! "unfuddle.id", unfuddle_id
      end
      pbar.inc
    end
    pbar.finish
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
houston-core-0.9.2 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.9.1 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.9.0 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.9.0.rc1 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.4 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.3 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.2 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.1 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.0 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.0.pre2 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.8.0.pre db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.7.0 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.7.0.beta4 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.7.0.beta3 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.7.0.beta2 db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb
houston-core-0.7.0.beta db/migrate/20160625230420_move_users_unfuddle_id_to_props.rb