title: How do I create a new database for an existing App using Django South and set default values?
body: <p>I'm working with an OS project that uses South to migrate the database.
  I'm building a new database from scratch and I want to make sure South is setup so I can easily update the database in the future.</p>
  
  <p>It seems this process should be:</p>
  
  <ol>
  <li>create the db</li>
  <li>syncdb</li>
  <li>migrate  </li>
  </ol>
  
  <p>However, when I try to migrate the databases, one of the the earlier migrations(migration 0004 and they go to 0009) throws an exception:  </p>
  
  <pre><code>ValueError: You cannot add a null=False column without a default value.
  </code></pre>
  
  <p>I don't understand how to add a default value to migration 0004 so this exception isn't thrown.</p>
  
  <p>The migrations don't need to be run through because the database is empty.</p>
  
  <p>However,  <strong>south_migrationhistory</strong> must contain a list of all migrations and when they were applied.</p>
  
  <p>I tried to hack it and just add migration 0009 to the database manually, but this threw another error because the intermediary migrations had not been run.
  I also tried to add a field to database to see if I could figure out the syntax of  add_column would look like with a default value of 0 supplied.
  The format looks totally different than these older migrations.</p>
  
  <p>Here are the 2 different versions of the add_column syntax:  </p>
  
  <pre><code>#0004 syntax:  
  db.add_column('experiments_dailyreport', 'test_group_size', orm['experiments.dailyreport:test_group_size'])
  #0009 syntax:
  syntax db.add_column('experiments_dailyreport', 'test_group_size', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
  </code></pre>
  
  <p>So, I'm guessing there was a change in the South code between when 0004 was created and today.</p>
  
  <p><strong>Is there a way to build the database with syncdb and then somehow update south_migrationhistory without running manage.py migrate  ?</strong></p>
  
  <p>If you have an existing app with South migrations, how would you build a new database from scratch?</p>
  
  <p>I can't migrate because there is no default set on a integer field.
  How do I set a default in an older migration? The field doesn't even exist anymore.</p>
  
  <p>syntaxes attempted:  </p>
  
  <pre><code>db.add_column('experiments_dailyreport', 'test_group_size', orm['experiments.dailyreport:test_group_size'], {'default': 0})
  #throws ValueError: You cannot add a null=False column without a default value.
  db.add_column('experiments_dailyreport', 'test_group_size', self.gf('django.db.models.fields.IntegerField')(default=0), keep_default=False)
  #throws AttributeError: Migration instance has no attribute 'gf'
  </code></pre>
  
  <p>I'm using South-0.7.2-py2.7.egg</p>