Always truncate incident templates

This commit is contained in:
James Brooks
2016-03-16 09:26:39 +00:00
parent 8e8a78ca10
commit 51bbcc2a7d
@@ -14,6 +14,7 @@ namespace CachetHQ\Cachet\Console\Commands;
use CachetHQ\Cachet\Models\Component; use CachetHQ\Cachet\Models\Component;
use CachetHQ\Cachet\Models\ComponentGroup; use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Cachet\Models\Incident; use CachetHQ\Cachet\Models\Incident;
use CachetHQ\Cachet\Models\IncidentTemplate;
use CachetHQ\Cachet\Models\Metric; use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\MetricPoint; use CachetHQ\Cachet\Models\MetricPoint;
use CachetHQ\Cachet\Models\Setting; use CachetHQ\Cachet\Models\Setting;
@@ -62,6 +63,7 @@ class DemoSeederCommand extends Command
$this->seedComponentGroups(); $this->seedComponentGroups();
$this->seedComponents(); $this->seedComponents();
$this->seedIncidents(); $this->seedIncidents();
$this->seedIncidentTemplates();
$this->seedMetricPoints(); $this->seedMetricPoints();
$this->seedMetrics(); $this->seedMetrics();
$this->seedSettings(); $this->seedSettings();
@@ -207,6 +209,16 @@ class DemoSeederCommand extends Command
} }
} }
/**
* Seed the incident templates table.
*
* @return void
*/
protected function seedIncidentTemplates()
{
IncidentTemplate::truncate();
}
/** /**
* Seed the metric points table. * Seed the metric points table.
* *