laravel 5.4 migration problem

new laravel 5.4

[email protected]> php artisan migrate                        ~/Desktop/laravel


  [Illuminate\Database\QueryException]                                         
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre  
  ady exists (SQL: create table `users` (`id` int unsigned not null auto_incr  
  ement primary key, `name` varchar(255) not null, `email` varchar(255) not n  
  ull, `password` varchar(255) not null, `remember_token` varchar(100) null,   
  `created_at` timestamp null, `updated_at` timestamp null) default character  
   set utf8mb4 collate utf8mb4_unicode_ci)                                     



  [PDOException]                                                               
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' alre  
  ady exists                                                                   


[1] [email protected]>   

php 7.1.0 mariadb-10.1.22-1

jubayed
jubayed
  • 1 week ago

The users table already exists. Stop trying to create it, it already exists.

First do migrate:refresh to rollback all migrations Then try to migrate.