Skip to content

Commit 74f8000

Browse files
authored
Merge pull request #5876 from nhsuk/data-migration-remove-performed-at-time
Add `unset_vaccination_record_performed_at_time`
2 parents f872965 + 977813e commit 74f8000

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lib/tasks/data_migration.rake

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
namespace :data_migration do
4+
desc "Unset performed at time on imported vaccination records if midnight"
5+
task unset_vaccination_record_performed_at_time: :environment do
6+
VaccinationRecord
7+
.sourced_from_historical_upload
8+
.where("performed_at_time = '00:00:00'")
9+
.update_all(performed_at_time: nil)
10+
end
11+
end

0 commit comments

Comments
 (0)