Skip to content

Commit

Permalink
Update ruby version, fix the migrations script
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Jul 6, 2023
1 parent 2565b38 commit c45a97a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.7
2.7.8
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ source "https://rubygems.org"

git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby "2.7.7"
ruby "2.7.8"

gem "rails", "6.1.6"

Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ DEPENDENCIES
webpacker (~> 4)

RUBY VERSION
ruby 2.7.7p221
ruby 2.7.8p225

BUNDLED WITH
2.1.4
10 changes: 8 additions & 2 deletions lib/tasks/split_teacher_pending_state.rake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
namespace :split_teacher_pending_state do
desc "Change all the pending state into not_reviewed state"
task split: :environment do
Teacher.where(application_status: "pending").update_all(application_status: "not_reviewed")
Teacher.where(application_status: nil).update_all(application_status: "not_reviewed")
puts "Updating Pending/nil status to not_reviewed"
puts "Pending -> not reviewed"
puts Teacher.where(application_status: "Pending").update_all(application_status: "not_reviewed")
puts "Nil -> not_reviewed"
puts Teacher.where(application_status: nil).update_all(application_status: "not_reviewed")
puts "empty string -> not_reviewed"
puts Teacher.where(application_status: '').update_all(application_status: "not_reviewed")
puts "Done."
end
end

0 comments on commit c45a97a

Please sign in to comment.