Sha256: 2af78e84d2188890211abf17295342140f491680b8caaa05421b8c99db77f921

Contents?: true

Size: 304 Bytes

Versions: 7

Compression:

Stored size: 304 Bytes

Contents

# This migration comes from spree (originally 20101026184932)
class PreventNilEmail < ActiveRecord::Migration
  def up
    execute "UPDATE orders SET email = 'guest@example.com' WHERE email IS NULL"
    execute "UPDATE orders SET email = 'guest@example.com' WHERE email = ''"
  end

  def down
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
spree_mercado_pago_payment_method-0.0.2 spec/dummy/db/migrate/20121121030207_prevent_nil_email.spree.rb
spree_mercado_pago_payment_method-0.1.1 spec/dummy/db/migrate/20121121030207_prevent_nil_email.spree.rb
spree_mercado_pago_payment_method-0.1.0 spec/dummy/db/migrate/20121121030207_prevent_nil_email.spree.rb
datashift_spree-0.3.0 spec/sandbox/db/migrate/20121023154426_prevent_nil_email.spree.rb
datashift_spree-0.2.1 spec/sandbox/db/migrate/20121015151219_prevent_nil_email.spree.rb
datashift_spree-0.2.0 spec/sandbox/db/migrate/20120925192787_prevent_nil_email.spree.rb
datashift_spree-0.1.0 spec/sandbox/db/migrate/20120918081518_prevent_nil_email.spree.rb