title: laravel 7 using as uuid foreign key
body: <p>I have two tables, in both, I am using UUID to generate an id.
  after that, I am trying to use one id as a foreign in the second table. as shown
  the migration does accept what I am doing but when I insert data I get this error</p>
  <pre><code>Illuminate/Database/QueryException with message 'SQLSTATE[01000]: Warning: 1265 Data truncated for column 'userId' at row 1 
  </code></pre>
  <p>her is my first tables:</p>
  <pre><code>       Schema::create('users', function (Blueprint $table) {
              $table-&gt;uuid('id')-&gt;primary();
              $table-&gt;string('userName')-&gt;unique();
              $table-&gt;string('email')-&gt;unique();
              $table-&gt;boolean('isVerified')-&gt;default(false);
              $table-&gt;timestamp('email_verified_at')-&gt;nullable();
              $table-&gt;string('password');
              $table-&gt;rememberToken();
              $table-&gt;timestamps();
          });
  </code></pre>
  <p>the second table with the foreign key</p>
  <pre><code>Schema::create('tableTwo', function (Blueprint $table) {
              $table-&gt;uuid('id')-&gt;primary();
              $table-&gt;unsignedBigInteger('userId');
              $table-&gt;foreign('userId')
              -&gt;references('id')
              -&gt;on('users')
              -&gt;onDelete('cascade');
              $table-&gt;timestamps();
          });
  </code></pre>