From 8d29bf294645175dbd969fde31df64876e4c45b5 Mon Sep 17 00:00:00 2001 From: Juan24 Date: Mon, 20 Apr 2026 18:29:37 -0300 Subject: [PATCH] Rename stage 'mitigate_risks' to 'mitigate_risk' Replace occurrences of the 'mitigate_risks' stage with 'mitigate_risk'. Updated the WhatNowRepository stage list and replaced seed CSV entries accordingly. Added a migration that safely renames the enum value by temporarily expanding the ENUM to include both values, updating existing rows to 'mitigate_risk', then shrinking the ENUM; the migration includes a down method to revert the change. --- .../Repositories/WhatNowRepository.php | 2 +- ...te_risk_in_whatnow_entity_stages_table.php | 32 ++ database/seeds/whatnow_entity_stages.csv | 452 +++++++++--------- 3 files changed, 259 insertions(+), 227 deletions(-) create mode 100644 database/migrations/2026_04_20_000000_change_mitigate_risks_to_mitigate_risk_in_whatnow_entity_stages_table.php diff --git a/app/Classes/Repositories/WhatNowRepository.php b/app/Classes/Repositories/WhatNowRepository.php index ba20f3b..fd6f191 100644 --- a/app/Classes/Repositories/WhatNowRepository.php +++ b/app/Classes/Repositories/WhatNowRepository.php @@ -14,7 +14,7 @@ class WhatNowRepository implements WhatNowRepositoryInterface 'recover', 'anticipated', 'assess_and_plan', - 'mitigate_risks', + 'mitigate_risk', 'prepare_to_respond', diff --git a/database/migrations/2026_04_20_000000_change_mitigate_risks_to_mitigate_risk_in_whatnow_entity_stages_table.php b/database/migrations/2026_04_20_000000_change_mitigate_risks_to_mitigate_risk_in_whatnow_entity_stages_table.php new file mode 100644 index 0000000..07d7f3b --- /dev/null +++ b/database/migrations/2026_04_20_000000_change_mitigate_risks_to_mitigate_risk_in_whatnow_entity_stages_table.php @@ -0,0 +1,32 @@ +