Migration to add the field to the custom_fields table

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-11-08 15:27:34 +00:00
parent 7c37c70164
commit f91e1d58ad

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddDisplayToUserInCustomFields extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->boolean('display_in_user_view')->nullable()->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('custom_fields', function (Blueprint $table) {
$table->dropColumn('display_in_user_view');
});
}
}