当我迁移一个表格时,我看到了这个错误:
SQLSTATE[42S01]: 基础表或视图已经存在:1050 表 'payments' 已经存在 (SQL: create table
payments
)
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePaymentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payments', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->string('resnumber');
$table->string('course_id')->default('vip');
$table->string('price');
$table->boolean('payment')->default(false);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('payments');
}
}
payments
表吗?同时能否分享所有表的截图? - Niklesh Raut