title: Illuminate\Database\QueryException : SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into `users`
body: <p>I have a question and the answers i have been getting are not really helping me.</p>
  
  <p>So I have been trying to basically create a Profiles table for each users. I followed through the rules for One to One relationship but i keep getting this error</p>
  
  <blockquote>
    <p>Illuminate\Database\QueryException  : SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a default value (SQL: insert into <code>users</code> (<code>name</code>, <code>email</code>, <code>password</code>, <code>admin</code>, <code>updated_at</code>, <code>created_at</code>) values (Darlington Okorie, darlingtonokoriec@gmail.com, $2y$10$Ob161LW8sbbv5uDv9VVbienlmW.DWXVDK3wdfC0I0NlnOrg1Jx/a2, 1, 2019-12-23 17:41:30, 2019-12-23 17:41:30))</p>
  </blockquote>
  
  <p>Heres the code i wrote in my <code>UsersTableSeeder</code></p>
  
  <pre><code>public function run()
  {
  
   $user = App\User::create([
          'name' =&gt; 'Darlington Okorie',
          'email' =&gt; 'darlingtonokoriec@gmail.com',
          'password' =&gt; bcrypt('password'),
          'admin' =&gt; 1
      ]);
  
      App/Profile::create([
          'user_id' =&gt;  $user-&gt;id,
          'avatar' =&gt; 'uploads/avatar/img.png',
          'about' =&gt; 'Great at writing. Better at blogging',
          'facebook' =&gt; 'facebook.com',
          'youtube' =&gt; 'youtube.com'
      ]);
  }
  </code></pre>
  
  <p>And i had also defined <code>user_id</code> in my <code>create_users_table</code></p>
  
  <pre><code>public function up()
  {
      Schema::create('users', function (Blueprint $table) {
          Schema::dropIfExists('users');
          $table-&gt;bigIncrements('id');
          $table-&gt;string('name');
          $table-&gt;string('user_id');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;boolean('admin')-&gt;default(0);
          $table-&gt;timestamp('email_verified_at')-&gt;nullable();
          $table-&gt;string('password');
          $table-&gt;rememberToken();
          $table-&gt;timestamps();
      });
  }
  </code></pre>
  
  <p>And defined the <code>user_id</code> in my <code>create_profiles_table</code></p>
  
  <pre><code> public function up()
  {
      Schema::create('profiles', function (Blueprint $table) {
          $table-&gt;bigIncrements('id');
          $table-&gt;string('avatar');
          $table-&gt;integer('user_id');
          $table-&gt;text('about');
          $table-&gt;string('facebook');
          $table-&gt;string('youtube');
  
          $table-&gt;timestamps();
      });
  }
  </code></pre>
  
  <p>What could be wrong?</p>