Skip to content

Commit

Permalink
Fix child age migration
Browse files Browse the repository at this point in the history
  • Loading branch information
cdccollins committed Sep 25, 2024
1 parent a63af15 commit e891620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/migrate/20240923131205_add_child_birthday_to_usr.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ def change
add_column :users, :child_birthday, :date

User.find_each do |user|
user.update(child_birthday: user.created_at - 18.months)
user.update(child_birthday: Time.now - user.child_age.months)
end

remove_column :users, :child_age, :date
Expand Down

0 comments on commit e891620

Please sign in to comment.