When i migrate my tables into db, it gives this error
SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table
users(idint unsigned not null auto_increment primary key,bodylongtext not null,urlvarchar(255) null,user_idint unsigned not null,commentable_idint unsigned not null,commentable_typevarchar(191) not null,created_a ttimestamp null,updated_attimestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci) In Connection.php line 449: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if(!Schema::hasTable('users')){
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table-> string('name');
$table-> string('email')->unique();
$table-> string('password');
$table->rememberToken();
$table->timestamps();
});
}
Schema::table('users', function(Blueprint $table){
$table -> string('first_name') -> nullabel();
$table -> string('middle_name') -> nullabel();
$table -> string('last_name') -> nullabel();
$table -> string('city') -> nullabel();
$table -> integer('role') -> unsigned();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
I dropped all the tables from database then i tried but same error given

php artisan migrate:fresh- Farhad Misirli.envfile and see if the database name is what it should be. - Rouhollah Mazarei