mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
10 lines
242 B
Ruby
10 lines
242 B
Ruby
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
|