Added checkbox and migration on how to show username

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe
2023-02-14 20:44:29 -08:00
parent be404d34c5
commit dd3fcdf018
2 changed files with 50 additions and 0 deletions
@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddUsernameDisplayToSettings extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('settings', function (Blueprint $table) {
$table->boolean('display_username')->after('show_archived_in_list')->default(1)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('settings', function (Blueprint $table) {
if (Schema::hasColumn('assets', 'display_username_in_list')) {
$table->dropColumn('display_username');
}
});
}
}