title: django.db.utils.OperationalError no matter what I try
body: <p>OK, I'm stumped.  I think I've tried everything.  </p>
  
  <p>I created a model in an app's <code>models.py</code> and also added some more fields to an existing model (all with default values).  Then I ran <code>makemigrations</code>.  The result:</p>
  
  <pre><code>$ python3 manage.py makemigrations
  Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/sqlite3/base.py", line 323, in execute
      return Database.Cursor.execute(self, query, params)
  sqlite3.OperationalError: no such column: myapp_MyExistingModel.first_new_field
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 14, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 345, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 348, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 398, in execute
      self.check()
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 426, in check
      include_deployment_checks=include_deployment_checks,
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/registry.py", line 75, in run_checks
      new_errors = check(app_configs=app_configs)
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/urls.py", line 13, in check_url_config
      return check_resolver(resolver)
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/urls.py", line 23, in check_resolver
      for pattern in resolver.url_patterns:
    File "/usr/local/lib/python3.5/dist-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/usr/local/lib/python3.5/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/usr/local/lib/python3.5/dist-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/usr/local/lib/python3.5/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "/path/to/myproject/myproject/urls.py", line 49, in &lt;module&gt;
      url(r'^someurl/', include('myapp.urls')),
    File "/usr/local/lib/python3.5/dist-packages/django/conf/urls/__init__.py", line 52, in include
      urlconf_module = import_module(urlconf_module)
    File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "/path/to/myproject/myapp/urls.py", line 2, in &lt;module&gt;
      from . import views
    File "/path/to/myproject/myapp/views.py", line 8, in &lt;module&gt;
      existing_model = MyExistingModel.objects.all()[0]
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 297, in __getitem__
      return list(qs)[0]
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 258, in __iter__
      self._fetch_all()
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 1074, in _fetch_all
      self._result_cache = list(self.iterator())
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 52, in __iter__
      results = compiler.execute_sql()
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
      cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 79, in execute
      return super(CursorDebugWrapper, self).execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/utils.py", line 95, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/usr/local/lib/python3.5/dist-packages/django/utils/six.py", line 685, in reraise
      raise value.with_traceback(tb)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/sqlite3/base.py", line 323, in execute
          return Database.Cursor.execute(self, query, params)
      django.db.utils.OperationalError: no such column: myapp_MyExistingModel.first_new_field
  </code></pre>
  
  <p>If it matters, I'm using Mezzanine CMS and MyExistingModel is an extension of its <code>Page</code> class.  It only has one instance.  </p>
  
  <p>So here's what I tried next:</p>
  
  <ol>
  <li><code>manage.py migrate --fake</code></li>
  <li><code>manage.py flush</code></li>
  <li>Renaming my database so a new one would be created</li>
  </ol>
  
  <p>All of these threw the same traceback.  I went into the last migration for the app.  It contained an <code>AddModel</code> for my new model and a <code>RemoveField</code> for a field in the old model I renamed, but no <code>AddField</code> for the new fields I created.  So I added them to the migrations file manually and retried <code>manage.py migrate --fake</code>.  Same traceback.  I tried all the other commands too.  Same traceback.  </p>
  
  <p>Finally, I deleted all the app's migrations, leaving just <code>__init__.py</code>.  I also renamed the database so it would be recreated.  I retried <code>flush</code>, <code>makemigrations</code>, and <code>migrate</code> (with and without <code>--fake</code>).  All of these resulted in this traceback: </p>
  
  <pre><code>Traceback (most recent call last):
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/sqlite3/base.py", line 323, in execute
      return Database.Cursor.execute(self, query, params)
  sqlite3.OperationalError: no such table: myapp_MyExistingModel
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 14, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 345, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 348, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 398, in execute
      self.check()
    File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 426, in check
      include_deployment_checks=include_deployment_checks,
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/registry.py", line 75, in run_checks
      new_errors = check(app_configs=app_configs)
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/urls.py", line 13, in check_url_config
      return check_resolver(resolver)
    File "/usr/local/lib/python3.5/dist-packages/django/core/checks/urls.py", line 23, in check_resolver
      for pattern in resolver.url_patterns:
    File "/usr/local/lib/python3.5/dist-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/usr/local/lib/python3.5/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/usr/local/lib/python3.5/dist-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/usr/local/lib/python3.5/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "/path/to/myproject/myproject/urls.py", line 49, in &lt;module&gt;
      url(r'^someurl/', include('myapp.urls')),
    File "/usr/local/lib/python3.5/dist-packages/django/conf/urls/__init__.py", line 52, in include
      urlconf_module = import_module(urlconf_module)
    File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 986, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 969, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 958, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 673, in _load_unlocked
    File "&lt;frozen importlib._bootstrap_external&gt;", line 665, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 222, in _call_with_frames_removed
    File "/path/to/myproject/myapp/urls.py", line 2, in &lt;module&gt;
      from . import views
    File "/path/to/myproject/myapp/views.py", line 8, in &lt;module&gt;
      existing_model = MyExistingModel.objects.all()[0]
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 297, in __getitem__
      return list(qs)[0]
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 258, in __iter__
      self._fetch_all()
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 1074, in _fetch_all
      self._result_cache = list(self.iterator())
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/query.py", line 52, in __iter__
      results = compiler.execute_sql()
    File "/usr/local/lib/python3.5/dist-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
      cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 79, in execute
      return super(CursorDebugWrapper, self).execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/utils.py", line 95, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/usr/local/lib/python3.5/dist-packages/django/utils/six.py", line 685, in reraise
      raise value.with_traceback(tb)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/usr/local/lib/python3.5/dist-packages/django/db/backends/sqlite3/base.py", line 323, in execute
      return Database.Cursor.execute(self, query, params)
  django.db.utils.OperationalError: no such table: myapp_MyExistingModel
  </code></pre>
  
  <p>At this point, I have no idea what to even try next, except <a href="https://stackoverflow.com/questions/29963186/django-1-7-migrations-django-db-utils-operationalerror-no-such-table-db-trans#comment48048112_29963186">start over</a>.  Any suggestions are appreciated.  </p>