Adds incident visibility. Closes #602
This commit is contained in:
committed by
James Brooks
parent
9257135641
commit
df2ae7726d
@@ -36,6 +36,7 @@ $factory->define('CachetHQ\Cachet\Models\Incident', function ($faker) {
|
||||
'name' => $faker->sentence(),
|
||||
'message' => $faker->paragraph(),
|
||||
'status' => 1,
|
||||
'visible' => 1,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) James Brooks <james@cachethq.io>
|
||||
* (c) Joseph Cohen <joseph.cohen@dinkbit.com>
|
||||
* (c) Graham Campbell <graham@mineuk.com>
|
||||
*
|
||||
* 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 AlterTableIncidentsAddVisibileColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('incidents', function (Blueprint $table) {
|
||||
$table->boolean('visible')->after('status')->default(1);
|
||||
|
||||
$table->index('visible');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('incidents', function (Blueprint $table) {
|
||||
$table->dropColumn('visible');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user