title: django_admin database creation, after sql command depreciated
body: <p>I was using django 1.3 and python 2.4 for a big scale project. I decided to update it to django 1.9 and python 2.7.</p>
  
  <p>Since django_admin's sql parameter is depreciated in 1.9, the update database creation method changed a lot. </p>
  
  <p>I am using the command:</p>
  
  <pre><code>python /usr/local/django/&lt;project&gt;/manage.py migrate --fake-initial --noinput --run-syncdb
  </code></pre>
  
  <p>for table creation. But my tables are not created and manage is printing this error.</p>
  
  <pre><code>  Traceback (most recent call last):
    File "/src/project/project-export/django/projectadmin/manage.py", line 13, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/opt/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/opt/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/opt/python/lib/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/opt/python/lib/python2.7/site-packages/django/core/management/base.py", line 398, in execute
      self.check()
    File "/opt/python/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check
      include_deployment_checks=include_deployment_checks,
    File "/opt/python/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks
      new_errors = check(app_configs=app_configs)
    File "/opt/python/lib/python2.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config
      return check_resolver(resolver)
    File "/opt/python/lib/python2.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver
      for pattern in resolver.url_patterns:
    File "/opt/python/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/opt/python/lib/python2.7/site-packages/django/core/urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/opt/python/lib/python2.7/site-packages/django/utils/functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/opt/python/lib/python2.7/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "/opt/python/lib/python2.7/importlib/__init__.py", line 37, in import_module
      __import__(name)
    File "/usr/local/django/projectadmin/projectadmin/urls.py", line 4, in &lt;module&gt;
      import projectadmin.views
    File "/usr/local/django/projectadmin/projectadmin/views.py", line 20, in &lt;module&gt;
      from projectadmin.forms import UserCreationForm
    File "/usr/local/django/projectadmin/projectadmin/forms.py", line 252, in &lt;module&gt;
      class UserCreationForm(forms.ModelForm):
    File "/usr/local/django/projectadmin/projectadmin/forms.py", line 256, in UserCreationForm
      template_choice = form_utils.create_template_choices_field()
    File "/usr/local/django/projectadmin/projectadmin/form_utils.py", line 15, in create_template_choices_field
      choices = [(x.id, x.template_name) for x in all_templates]
    File "/opt/python/lib/python2.7/site-packages/django/db/models/query.py", line 258, in __iter__
      self._fetch_all()
    File "/opt/python/lib/python2.7/site-packages/django/db/models/query.py", line 1074, in _fetch_all
      self._result_cache = list(self.iterator())
    File "/opt/python/lib/python2.7/site-packages/django/db/models/query.py", line 52, in __iter__
      results = compiler.execute_sql()
    File "/opt/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 848, in execute_sql
      cursor.execute(sql, params)
    File "/opt/python/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/opt/python/lib/python2.7/site-packages/django/db/utils.py", line 95, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/opt/python/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/opt/python/lib/python2.7/site-packages/django/db/backends/mysql/base.py", line 112, in execute
      return self.cursor.execute(query, args)
    File "/opt/python/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
      self.errorhandler(self, exc, value)
    File "/opt/python/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
      raise errorclass, errorvalue
  django.db.utils.ProgrammingError: (1146, "Table 'project.projectadmin_usertemplate' doesn't exist")
  </code></pre>
  
  <p>There is nothing related with table creation in the error. It complains about missing the table but does not create it.</p>
  
  <p>I am suspecting that <code>INSTALLED_APPS</code> does not include my tables, but I have appended my application to the list in my <code>settings.py</code>.
  I got suspicious that I need to add my application separately to the <code>installed_apps</code> list. </p>
  
  <p>I have followed recommended procedure by django itself while updating the system. </p>
  
  <p>If my suspicions are true how could I add models to installed apps or any other suggestion would be great?</p>