Sha256: 025cb7e7dc5b6a821b74a21e680df68cd17ea1f7cd0a60821db5f1e964aa376e

Contents?: true

Size: 257 Bytes

Versions: 3

Compression:

Stored size: 257 Bytes

Contents

class AddIdoIdToExistingErrs < Mongoid::Migration
  def self.up
    errs = Err.where(:ido_id => nil).all
    puts "Generating 'ido_id's for #{errs.size} Errs..."
    errs.each do |err|
      err.update_attribute :ido_id, UUID.new.generate
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
errbit_cloudfuji-0.2.4 db/migrate/2012053021240_add_ido_id_to_existing_errs.rb
errbit_cloudfuji-0.2.3 db/migrate/2012053021240_add_ido_id_to_existing_errs.rb
errbit_cloudfuji-0.2.2 db/migrate/2012053021240_add_ido_id_to_existing_errs.rb