Files
cachet-docker/database/migrations/2015_05_20_073041_AlterTableIncidentsAddVisibileColumn.php
2015-06-11 22:43:16 +01:00

46 lines
1.0 KiB
PHP

<?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');
});
}
}