Skip to content

Commit

Permalink
fix(cms): update exit survey sent flag on old cases
Browse files Browse the repository at this point in the history
Jira: PWNN-1939
  • Loading branch information
EdwinKruglov committed Feb 23, 2024
1 parent d248515 commit 1925345
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class UpdateExitSurveySentFlagOnOldCases < ActiveRecord::Migration[7.1]
def up
if ENV["APPLICATION_URL"] == "https://www.get-help-buying-for-schools.service.gov.uk"
kase_refs = %w[000042 000077 000252]
kase_refs.each do |ref|
kase = Support::Case.find_by(ref:)
kase.update!(exit_survey_sent: true) if kase.present?
end
end
end

def down; end
end
2 changes: 1 addition & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.1].define(version: 2024_02_12_113720) do
ActiveRecord::Schema[7.1].define(version: 2024_02_22_164526) do
create_sequence "evaluation_refs"
create_sequence "framework_refs"

Expand Down

0 comments on commit 1925345

Please sign in to comment.