title: Adding a SearchVectorField to a model in Django
body: <p>So I'm trying to add a <a href="https://docs.djangoproject.com/en/1.10/ref/contrib/postgres/search/#searchvectorfield" rel="noreferrer">SearchVectorField</a> to a model in Django:</p>
  
  <pre><code>class JobPosting(models.Model):
      ...
      ...
      search_vector = SearchVectorField()
  </code></pre>
  
  <p>I get that it should either be <code>nullable</code> or have a default value to be able to migrate so I deleted all entries in the table to prevent this problem.</p>
  
  <p>However, I'm getting the following error when running <code>makemigrations</code>:</p>
  
  <pre><code>You are trying to add a non-`nullable` field 'search_vector' to jobposting without a default;
  we can't do that (the database needs something to populate existing rows).
  Please select a fix:
     1) Provide a one-off default now
        (will be set on all existing rows with a null value for this column)
     2) Quit, and let me add a default in models.py
  Select an option:
  </code></pre>
  
  <p>Why is it saying this if the table is empty? I don't want to make the column nullable, and I'd rather not have a default value if I can avoid it. </p>
  
  <p>My question is, is there any way to force <code>makemigrations</code> and <code>migrate</code> as I don't understand the problem if the table is empty. I have other tables with data in them which I don't want to delete so can't delete all info in the database.</p>
  
  <p>Alternatively, if option <code>1)</code> is the solution, how would I format a default value for this type of field?  I assume it's not a normal text field?</p>
  
  <p>Thanks for any help.</p>