mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Fixed #10892 - MySQL 8 compatibilty requires primary key
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0882cfede2
commit
c12ef19fcc
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddPrimaryKeyToCustomFieldsPivot extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
|
||||
$table->bigIncrements('id')->first();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('custom_field_custom_fieldset', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('custom_field_custom_fieldset', 'id')) {
|
||||
$table->dropColumn('id');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue