Skip to content

Commit

Permalink
Create EY journey configs on production
Browse files Browse the repository at this point in the history
`Claim::ClaimsAwaitingDecisionFinder` assumes that the EYPayments
journeys existing on production. This class is called by the
`StudentLoanPlanCheckJob` which has been
[erroring](https://app.rollbar.com/a/dfe-digital/fix/item/dfe-claims/1411)
and thus failing to import SLC data.
  • Loading branch information
rjlynch committed Nov 7, 2024
1 parent 1e82f1e commit 27f3129
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
27 changes: 27 additions & 0 deletions db/migrate/20241107164046_create_ey_journey_configs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
class CreateEyJourneyConfigs < ActiveRecord::Migration[7.0]
def up
[
Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME,
Journeys::EarlyYearsPayment::Provider::Authenticated::ROUTING_NAME,
Journeys::EarlyYearsPayment::Practitioner::ROUTING_NAME
].reject do |routing_name|
Journeys::Configuration.exists?(routing_name: routing_name)
end.each do |routing_name|
Journeys::Configuration.create!(
routing_name: routing_name,
current_academic_year: AcademicYear.current,
open_for_submissions: false
)
end
end

def down
[
Journeys::EarlyYearsPayment::Provider::Start::ROUTING_NAME,
Journeys::EarlyYearsPayment::Provider::Authenticated::ROUTING_NAME,
Journeys::EarlyYearsPayment::Practitioner::ROUTING_NAME
].each do |routing_name|
Journeys::Configuration.find_by(routing_name: routing_name)&.destroy
end
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.0].define(version: 2024_10_30_153139) do
ActiveRecord::Schema[7.0].define(version: 2024_11_07_164046) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "pg_trgm"
Expand Down

0 comments on commit 27f3129

Please sign in to comment.