Ich schaffe Migration in Laravel und wenn ich Befehl ausführen php artisan migrate
den Befehl geben Sie mir die folgende Fehlerdoppelte Spaltennamen Laravel
doppelte Spaltenname 'user_id' ('id' int unsigned nicht null auto_increment Primärschlüssel, 'user_id' int unsigned nicht null, 'user_id' int nicht null, 'order_id_' int unsigned nicht null, 'ORDER_ID' nicht null int) Standardzeichensatz UTF-8 collate utf8_unicode_ci)
Das ist mein Migration:
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserOrrderTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_orrder', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->integer('user_id')->references('id')->on('users');
$table->integer('order_id')->unsigned();
$table->integer('order_id')->references('id')->on('orders');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_orrder');
}
}