Skip to content

Commit

Permalink
Update patients.home_educated nil -> false when...
Browse files Browse the repository at this point in the history
...school is nil
  • Loading branch information
misaka committed Nov 29, 2024
1 parent 53d35c7 commit 8304999
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ def change
# school nil and home_educated false => unknown school

Patient.where.not(school_id: nil).update_all(home_educated: nil)
Patient.where(school_id: nil, home_educated: nil).update_all(
home_educated: false
)
Patient.where(home_educated: true).update_all(school_id: nil)
Patient.where(home_educated: false).update_all(school_id: nil)

Expand Down

0 comments on commit 8304999

Please sign in to comment.