Adds the ability to set the default view in which to display metrics

This commit is contained in:
James Brooks
2015-12-26 16:43:22 +00:00
parent 0d406b8360
commit 1c27cf7360
16 changed files with 152 additions and 28 deletions

View File

@@ -0,0 +1,41 @@
<?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\Support\Facades\Schema;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AlterTableMetricsAddDefaultViewColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('metrics', function (Blueprint $table) {
$table->tinyInteger('default_view')->unsigned()->default(1)->after('places');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('metrics', function (Blueprint $table) {
//
});
}
}