Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Migration of InProgressForm Status Column #16094

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/in_progress_form_status_default.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module DataMigrations
module InProgressFormStatusDefault
module_function

def run
InProgressForm.where(status: nil).update_all(status: 'pending') # rubocop:disable Rails/SkipsModelValidations
end
end
end
7 changes: 7 additions & 0 deletions rakelib/in_progress_forms_status_change.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

namespace :data_migration do
task in_progress_forms_status: :environment do
DataMigrations::InProgressFormStatusDefault.run
end
end
Loading