title: PHP Artisan migrate fails
body: <p><strong>This problem has been solved. Check my post below</strong></p>
  
  <p>I have just installed a fresh Laravel 5.4 project. </p>
  
  <p>As i'm following Jeffrey Way's Laravel from scratch tutorial i get the following errors when i want to migrate my database:</p>
  
  <pre><code>  [Illuminate\Database\QueryException]
    SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already
    exists (SQL: create table `users` (`id` int unsigned not null auto_increment pr
    imary key, `name` varchar(255) not null, `email` varchar(255) not null, `passwo
    rd` varchar(255) not null, `remember_token` varchar(100) null, `created_at` tim
    estamp null, `updated_at` timestamp null) default character set utf8mb4 collate
    utf8mb4_unicode_ci)
  </code></pre>
  
  <p>-</p>
  
  <pre><code>[PDOException]
    SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already
    exists
  </code></pre>
  
  <p>Like i said, it's a fresh installation and i don't know how to fix this. Does anyone of you know?</p>
  
  <p>Thanks in advance!</p>
  
  <p>@ian,</p>
  
  <p>I followed the instructions you gave me but now i get this error:</p>
  
  <pre><code>    [Illuminate\Database\QueryException]
    SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l
    ong; max key length is 767 bytes (SQL: alter table `users` add unique `users_em
    ail_unique`(`email`))
  </code></pre>
  
  <p>-</p>
  
  <pre><code>  [PDOException]
    SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too l
    ong; max key length is 767 bytes
  </code></pre>
  
  <p><strong>How to solve this issue:</strong></p>
  
  <p>This is how i did this, thanks to Ian:</p>
  
  <ol>
  <li>delete database and create a new one</li>
  <li>Update env file with new database credentials</li>
  <li>Go to <strong>App->Providers->AppServiceProvider.php</strong></li>
  <li>Add <code>Schema::defaultStringLength(191);</code> to the boot function</li>
  <li>make sure to add <code>use Illuminate\Support\Facades\Schema;</code> on the top of the file.</li>
  <li>Migrate the database and the problem is solved!</li>
  </ol>