I am trying to migrate:rollback
a users table and am receiving this error:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'AddSortable' not found
When I do migrate:reset I get the same error and when I try to migrate I get
[Illuminate\Database\QueryException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create t
able `users` (`id` int unsigned not null auto_increment primary key, `name` varchar(255) not null, `
email` varchar(255) not null, `password` varchar(255) not null, `remember_token` varchar(100) null,
`created_at` timestamp null, `updated_at` timestamp null) default character set utf8 collate utf8_un
icode_ci)
[PDOException]
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
this is my users table
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}
and here is the code for mysql in database.php
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
any help would be much appreciated!