title: South: Why the "column <colname> contains null values" error when a valid one-off default value has been provided
body: <p>Originally, the model attribute <strong><em>location</em></strong> for <strong><em>Item</em></strong> class was defined like the following:</p>
  
  <pre><code>location = models.ForeignKey('Location', related_name='+', null=True, on_delete=models.SET_NULL)
  </code></pre>
  
  <p>It then got redefined to:</p>
  
  <pre><code>location = models.ForeignKey('Location', related_name='+', on_delete=models.PROTECT)
  </code></pre>
  
  <p>Because of the change in definition, I executed South's <em>schemamigration</em>. South responded with </p>
  
  <blockquote>
    <p>The field 'Item.location' does not have a default specified, yet is
    NOT NULL. Since you are making this field non-nullable, you MUST
    specify a default value to use for existing rows.</p>
  </blockquote>
  
  <p>I picked choice '2' and provided the PK (integer) of an existing <em>Location</em>.</p>
  
  <p>But when I ran <em>migrate</em>, I got the following error:</p>
  
  <blockquote>
    <p>django.db.utils.IntegrityError: column "location_id" contains null values</p>
  </blockquote>
  
  <p>I don't understand why I got this error when I had provided a valid default location PK. This is really mind-boggling. Please help~ Thanks.</p>
  
  <p>Migration spec:</p>
  
  <pre><code>def forwards(self, orm):
      # Changing field 'Item.location'
      db.alter_column('lend_borrow_item', 'location_id', self.gf('django.db.models.fields.related.ForeignKey')(default=11, to=orm['app_name.Location']))
  def backwards(self, orm):
      # Changing field 'Item.location'
      db.alter_column('lend_borrow_item', 'location_id', self.gf('django.db.models.fields.related.ForeignKey')(null=True, to=orm['app_name.Location']))
  
  models = {
      'app_name.location': {
          'Meta': {'ordering': "['name']", 'object_name': 'Location'},
          'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
          'name': ('django.db.models.fields.CharField', [], {'max_length': '20'})
      },
      'lend_borrow.item': {
          'Meta': {'object_name': 'Item'},
          'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
          'location': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['app_name.Location']"}),
          'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
      }
  }
  </code></pre>