mirror of
https://github.com/snipe/snipe-it.git
synced 2026-03-01 13:36:10 +00:00
@ -14,13 +14,14 @@ class CreateCustomFieldCustomFieldset extends Migration {
|
||||
{
|
||||
Schema::create('custom_field_custom_fieldset', function(Blueprint $table)
|
||||
{
|
||||
$table->bigIncrements('id')->first();
|
||||
$table->integer('custom_field_id');
|
||||
$table->integer('custom_fieldset_id');
|
||||
|
||||
$table->integer('order');
|
||||
$table->boolean('required');
|
||||
$table->engine = 'InnoDB';
|
||||
$table->engine = 'InnoDB';
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -13,9 +13,14 @@ class AddPrimaryKeyToCustomFieldsPivot extends Migration
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
|
||||
// Check if the ID primary key already exists, if not, add it
|
||||
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
|
||||
$table->bigIncrements('id')->first();
|
||||
if (!Schema::hasColumn('custom_field_custom_fieldset', 'id')) {
|
||||
$table->bigIncrements('id')->first();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user