Allows ordering of component groups. Closes #573.

This commit is contained in:
James Brooks
2015-05-19 22:52:16 +01:00
parent 879a8a5c69
commit 9337c1a75b
12 changed files with 119 additions and 30 deletions

View File

@@ -0,0 +1,44 @@
<?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 AlterTableComponentGroupsAddOrder extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('component_groups', function (Blueprint $table) {
$table->integer('order')->after('name');
$table->index('order');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('component_groups', function (Blueprint $table) {
$table->dropColumn('order');
});
}
}