Fixing boo-boo in r11802 - but you can assign integers to booleans on all dbs
This commit is contained in:
parent
fc9046ce6f
commit
9432e7ce27
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
class AddEmailValid < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column "users", "email_valid", :boolean, :default => false, :null => false
|
||||
User.update_all(:email_valid => true)
|
||||
User.update_all("email_valid = (active != 0)") #email_valid is :boolean, but active is :integer. "email_valid = active" (see r11802 or earlier) will fail for stricter dbs than mysql
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue