title: PHP Laravel PDOException General error referencing column and referenced column in a foreign key constraint are incompatible
body: <p>I am currently doing migrations in Laravel via the Terminal, and have these two errors when attempting to use php artisan migrate; I will print errors below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Exception trace:
  
    1   PDOException::("SQLSTATE[HY000]: General error: 3780 Referencing column 'room_id' and referenced column 'id' in foreign key constraint 'contacts_room_id_foreign' are incompatible.")
        /Users/shaquilenoor/Desktop/chatapi/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458
  
    2   PDOStatement::execute()
        /Users/shaquilenoor/Desktop/chatapi/vendor/laravel/framework/src/Illuminate/Database/Connection.php:458</code></pre>
  </div>
  </div>
  </p>
  
  <p>Based on the code contained within the Exception Trace, the issue seems to be within the code below:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateContactsTable extends Migration
  {
      public function up()
      {
          Schema::create('contacts', function (Blueprint $table) {
              $table-&gt;increments('id');
              $table-&gt;unsignedInteger('user1_id');
              $table-&gt;unsignedInteger('user2_id');
              $table-&gt;integer('room_id')-&gt;unique();
              $table-&gt;timestamps();
              $table-&gt;foreign('room_id')-&gt;references('id')-&gt;on('rooms');
              $table-&gt;foreign('user1_id')-&gt;references('id')-&gt;on('users');
              $table-&gt;foreign('user2_id')-&gt;references('id')-&gt;on('users');
          });
      }
  
      public function down()
      {
          Schema::dropIfExists('contacts');
      }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>any ideas on how I can resolve?</p>