title: Laravel migration error SQLSTATE[42000]
body: <p>I have a couple of Laravel migrations. </p>
  
  <p><strong>1-create_countries_table`</strong></p>
  
  <pre><code>Schema::create('countries', function(Blueprint $table)
  {
      $table-&gt;increments('id');
          $table-&gt;string('name');
      $table-&gt;timestamps();
  });
  </code></pre>
  
  <p><strong>2-create_cities_table</strong></p>
  
  <pre><code>Schema::create('cities', function(Blueprint $table)
  {
      $table-&gt;increments('id');
          $table-&gt;string('name');
          $table-&gt;smallInteger('country_id');
      $table-&gt;timestamps();
          $table-&gt;foreign('country_id')-&gt;references('id')-&gt;on('countries');
  });
  </code></pre>
  
  <p>When I use <code>php artisan migrate</code> , I see this error</p>
  
  <pre><code>  [Illuminate\Database\QueryException]
    SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
   (SQL: alter table `cities` add constraint cities_country_id_foreign
   foreign key (`country_id`) references `countries` (`id`))
  
    [PDOException]
    SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint
  </code></pre>
  
  <p>What is the problem?</p>