title: Django CharField as primary key still allow Null value to be save
body: <p>Currently i have the following model that i would like to set CharField as primary key( my database is Mysql)</p>
  <pre><code>class Customer(models.Model):
  
      class Meta:
          db_table = &quot;customers&quot;
          verbose_name = _('Customer')
          verbose_name_plural = _('Customers')
  
      customer_id = models.CharField(_('Customer ID'),max_length=255, primary_key=True)
      name = models.CharField(_('Name'), max_length=255)
      created_at = models.DateTimeField(auto_now_add=True)
  </code></pre>
  <p>In the <a href="https://docs.djangoproject.com/en/3.1/ref/models/fields/#primary-key" rel="nofollow noreferrer">document</a> it stated that :</p>
  <blockquote>
  <p>primary_key=True implies null=False and unique=True. Only one primary
  key is allowed on an object.</p>
  </blockquote>
  <p>In Mysql the primary key has the following structure:</p>
  <blockquote>
  <p>customer_id, type=varchar(255), collation=latin1_swedish_ci,
  Attributes=blank Null=No, Default=None,Comments=blank, Extra=blank</p>
  </blockquote>
  <p>but when i try to use the save() method with null value for primary key:</p>
  <pre><code>Customer.objects.create(customer_id=None, name=&quot;abc&quot;)
  </code></pre>
  <p>It still save Null value in the primary key without returning any error or validation, why is that?</p>
  <p><strong>EDIT:</strong>
  After saving in Mysql it show the value of the customer_id=blank(when try to save it as None). Why it set to blank when saving customer_id=None?</p>