Fixed #10892 - MySQL 8 compatibilty requires primary key
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
0882cfede2
commit
c12ef19fcc
1 changed files with 34 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 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…
Add table
Reference in a new issue