title: Django throwing error django.db.utils.IntegrityError: UNIQUE constraint failed: mediaSort_userdata.user_id
body: <p>I'm testing my models on my django app and whenever i try to save my extended User model (using a OneToOne relationship) it throws that error</p>
  
  <p><strong>models.py</strong></p>
  
  <pre><code>class UserData(models.Model):
      lastSeason = models.IntegerField(default=0)
      lastChapter = models.IntegerField(default=0)
      user = models.OneToOneField(User,on_delete=models.CASCADE)
  
      def __str__(self):
          return self.user.username
  </code></pre>
  
  <p><strong>This is what i do on the manage.py shell:</strong></p>
  
  <pre><code>&gt;&gt;&gt; from django.contrib.auth.models import User
  &gt;&gt;&gt; from mediaSort.models import Show, UserData
  &gt;&gt;&gt; import datetime
  &gt;&gt;&gt; usL = User.objects.get(username='luciano')
  &gt;&gt;&gt; newUs = UserData(lastSeason=1,lastChapter=2,user=usL)
  &gt;&gt;&gt; newUs.save()
  </code></pre>
  
  <p><strong>And this is the error:</strong></p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 303, in execute
      return Database.Cursor.execute(self, query, params)
  sqlite3.IntegrityError: UNIQUE constraint failed: mediaSort_userdata.user_id
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "&lt;console&gt;", line 1, in &lt;module&gt;
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\base.py", line 729, in save
      force_update=force_update, update_fields=update_fields)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\base.py", line 759, in save_base
      updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\base.py", line 842, in _save_table
      result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\base.py", line 880, in _do_insert
      using=using, raw=raw)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\manager.py", line 82, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\query.py", line 1125, in _insert
      return query.get_compiler(using=using).execute_sql(return_id)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\models\sql\compiler.py", line 1280, in execute_sql
      cursor.execute(sql, params)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 100, in execute
      return super().execute(sql, params)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 68, in execute
      return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 77, in _execute_with_wrappers
      return executor(sql, params, many, context)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\utils.py", line 89, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)
    File "C:\Users\Luciano\AppData\Local\Programs\Python\Python36\lib\site-packages\django\db\backends\sqlite3\base.py", line 303, in execute
      return Database.Cursor.execute(self, query, params)
  django.db.utils.IntegrityError: UNIQUE constraint failed: mediaSort_userdata.user_id
  </code></pre>
  
  <p>Am I missing something here? Thanks in advance! </p>