Allow component groups to be collapsed by default. Closes #1398
This commit is contained in:
@@ -32,8 +32,9 @@ $factory->define(Component::class, function ($faker) {
|
||||
|
||||
$factory->define(ComponentGroup::class, function ($faker) {
|
||||
return [
|
||||
'name' => $faker->words(2, true),
|
||||
'order' => 0,
|
||||
'name' => $faker->words(2, true),
|
||||
'order' => 0,
|
||||
'collapsed' => false,
|
||||
];
|
||||
});
|
||||
|
||||
|
||||
@@ -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\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AlterTableComponentGroupsAddCollapsedColumn extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('component_groups', function (Blueprint $table) {
|
||||
$table->boolean('collapsed')->after('order')->default(false);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('component_groups', function (Blueprint $table) {
|
||||
$table->dropColumn('collapsed');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user