From 7622a8f47490a3d611b0dd7602e89c1fecac4f93 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 25 Jul 2017 14:40:43 -0400 Subject: [PATCH] Add status_id column --- app/Models/IncidentComponent.php | 3 +++ .../migrations/2017_07_18_214718_CreateIncidentComponents.php | 1 + 2 files changed, 4 insertions(+) diff --git a/app/Models/IncidentComponent.php b/app/Models/IncidentComponent.php index 76b36e7f..13218d15 100644 --- a/app/Models/IncidentComponent.php +++ b/app/Models/IncidentComponent.php @@ -31,6 +31,7 @@ class IncidentComponent extends Model protected $casts = [ 'incident_id' => 'int', 'component_id' => 'int', + 'status_id' => 'int', ]; /** @@ -41,6 +42,7 @@ class IncidentComponent extends Model protected $fillable = [ 'incident_id', 'component_id', + 'status_id', ]; /** @@ -51,6 +53,7 @@ class IncidentComponent extends Model public $rules = [ 'incident_id' => 'required|int', 'component_id' => 'required|int', + 'status_id' => 'required|int', ]; /** diff --git a/database/migrations/2017_07_18_214718_CreateIncidentComponents.php b/database/migrations/2017_07_18_214718_CreateIncidentComponents.php index eec87f54..f1926441 100644 --- a/database/migrations/2017_07_18_214718_CreateIncidentComponents.php +++ b/database/migrations/2017_07_18_214718_CreateIncidentComponents.php @@ -26,6 +26,7 @@ class CreateIncidentComponents extends Migration $table->increments('id'); $table->integer('incident_id')->unsigned()->index(); $table->integer('component_id')->unsigned()->index(); + $table->integer('status_id')->unsigned()->index(); $table->timestamps(); }); }