Add stickied incident

This commit is contained in:
Antoine GIRARD
2016-08-17 01:12:21 +02:00
parent 268e0c1747
commit 1954cf26f3
22 changed files with 191 additions and 14 deletions

View File

@@ -40,10 +40,11 @@ $factory->define(ComponentGroup::class, function ($faker) {
$factory->define(Incident::class, function ($faker) {
return [
'name' => $faker->sentence(),
'message' => $faker->paragraph(),
'status' => random_int(1, 4),
'visible' => 1,
'name' => $faker->sentence(),
'message' => $faker->paragraph(),
'status' => random_int(1, 4),
'visible' => 1,
'stickied' => false,
];
});

View File

@@ -0,0 +1,39 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterTableIncidentsAddStickiedColumn extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('incidents', function (Blueprint $table) {
$table->boolean('stickied')->after('visible')->default(false);
$table->index('stickied');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::table('incidents', function (Blueprint $table) {
$table->dropColumn('stickied');
});
}
}