Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Classes/Repositories/WhatNowRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class WhatNowRepository implements WhatNowRepositoryInterface
'recover',
'anticipated',
'assess_and_plan',
'mitigate_risks',
'mitigate_risk',
'prepare_to_respond',


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class ChangeMitigateRisksToMitigateRiskInWhatnowEntityStagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::statement("ALTER TABLE whatnow_entity_stages MODIFY COLUMN stage ENUM('immediate', 'warning', 'anticipated', 'assess_and_plan', 'mitigate_risks', 'mitigate_risk', 'prepare_to_respond', 'recover') NOT NULL");
DB::statement("UPDATE whatnow_entity_stages SET stage = 'mitigate_risk' WHERE stage = 'mitigate_risks'");
DB::statement("ALTER TABLE whatnow_entity_stages MODIFY COLUMN stage ENUM('immediate', 'warning', 'anticipated', 'assess_and_plan', 'mitigate_risk', 'prepare_to_respond', 'recover') NOT NULL");
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::statement("ALTER TABLE whatnow_entity_stages MODIFY COLUMN stage ENUM('immediate', 'warning', 'anticipated', 'assess_and_plan', 'mitigate_risks', 'mitigate_risk', 'prepare_to_respond', 'recover') NOT NULL");
DB::statement("UPDATE whatnow_entity_stages SET stage = 'mitigate_risks' WHERE stage = 'mitigate_risk'");
DB::statement("ALTER TABLE whatnow_entity_stages MODIFY COLUMN stage ENUM('immediate', 'warning', 'anticipated', 'assess_and_plan', 'mitigate_risks', 'prepare_to_respond', 'recover') NOT NULL");
}
}

Loading
Loading