私はlaravelを使用しており、別の移行を行おうとしていますが、テーブルが既に存在するため、次のエラーがスローされています:
[PDOException]
SQLSTATE[42S01]: Base table or view already
exists: 1050 Table 'users' already exists
移行ファイルに次の行を追加しました。
$table->softDeletes();
これは完全なファイルです:
<?php
use Illuminate\Database\Migrations\Migration;
class ConfideSetupUsersTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
// Creates the users table
Schema::create('users', function ($table) {
$table->increments('id');
$table->string('firstname');
$table->string('lastname');
$table->string('username')->unique();
$table->string('email')->unique();
$table->string('password');
$table->string('confirmation_code');
$table->string('remember_token')->nullable();
$table->softDeletes();
$table->boolean('confirmed')->default(false);
$table->timestamps();
});
// Creates password reminders table
Schema::create('password_reminders', function ($table) {
$table->string('email');
$table->string('token');
$table->timestamp('created_at');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::drop('password_reminders');
Schema::drop('users');
}
}
私が間違っていることはありますか?