mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 17:14:10 -08:00
Added auto_add_to_fieldsets
field
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
efc0929bbc
commit
07336bbc6a
|
@ -52,6 +52,7 @@ class CustomField extends Model
|
||||||
'name' => 'required|unique:custom_fields',
|
'name' => 'required|unique:custom_fields',
|
||||||
'element' => 'required|in:text,listbox,textarea,checkbox,radio',
|
'element' => 'required|in:text,listbox,textarea,checkbox,radio',
|
||||||
'field_encrypted' => 'nullable|boolean',
|
'field_encrypted' => 'nullable|boolean',
|
||||||
|
'auto_add_to_fieldsets' => 'boolean',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,6 +70,8 @@ class CustomField extends Model
|
||||||
'show_in_email',
|
'show_in_email',
|
||||||
'is_unique',
|
'is_unique',
|
||||||
'display_in_user_view',
|
'display_in_user_view',
|
||||||
|
'auto_add_to_fieldsets',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class AddAutoaddToCustomfields extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('custom_fields', function (Blueprint $table) {
|
||||||
|
$table->boolean('auto_add_to_fieldsets')->nullable()->default(0);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('custom_fields', function (Blueprint $table) {
|
||||||
|
if (Schema::hasColumn('custom_fields', 'auto_add_to_fieldsets')) {
|
||||||
|
$table->dropColumn('auto_add_to_fieldsets');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue