Velocipede's User, Sales, and Bike Inventory Web App
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
330 B

class UserEmailCanBeNull < ActiveRecord::Migration
def up
change_table :users do |t|
t.change :email, :string, default: nil, null: true
end
User.where(email: '').update_all(email: nil)
end
def down
change_table :users do |t|
t.change :email, :string, default: '', null: false
end
end
end