Skip to content

Commit 6bb570b

Browse files
authored
Data fix mhm and aad request distribution link and fulfilled status (#4873)
* Data Fix re started reqeusts that were actually fulfilled * Data Fix re started reqeusts that were actually fulfilled
1 parent 05fa004 commit 6bb570b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
class DataFixForMhmAndAad < ActiveRecord::Migration[7.2]
2+
def up
3+
# This is a one-time, one-way data fix for MHM and AAD. See support ticket starting Sept 9, 2024, 1327
4+
5+
return unless Rails.env.production?
6+
7+
# This request should be marked fulfilled and associated with distribution 74466. We have checked that no request is already associated with that distribution
8+
9+
request = Request.find("39408")
10+
request.distribution_id = "74466"
11+
request.status = 2
12+
request.save!
13+
14+
15+
## these addoitinal 3 requests have been identified as having the status 'started', when they should be 'fulfilled'
16+
# They already have distributions associated with them
17+
18+
["42063", "37900"].each do |request_id|
19+
request = Request.find(request_id)
20+
request.status = 2
21+
request.save!
22+
end
23+
24+
25+
end
26+
def down
27+
# treating this as irreversible. Though I suppose technically we could.
28+
end
29+
end

0 commit comments

Comments
 (0)