title: Error while running migration return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: near ")": syntax error
body: <p>I am learning Django and making a basic app till now I have coded the account handling part but when I run <code>python manage.py migrate</code> I get this is the console I can't understand which file to look into,</p>
  
  <pre><code> Operations to perform:   Apply all migrations: accounts, admin, auth, contenttypes, sessions
  
  Running migrations:   Applying accounts.0003_auto_20180910_1420...Traceback (most recent call last):  File "C:\Python\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)   File "C:\Python\lib\site-packages\django\db\backends\sqlite3\base.py", line 303, in execute
      return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: near ")": syntax error
  
  The above exception was the direct cause of the following exception: Operations to perform:   Apply all migrations: accounts, admin, auth, contenttypes, sessions
  
  Running migrations:   Applying accounts.0003_auto_20180910_1420...Traceback (most recent call last):  File "C:\Python\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)   File "C:\Python\lib\site-packages\django\db\backends\sqlite3\base.py", line 303, in execute
      return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: near ")": syntax error
  
  The above exception was the direct cause of the following exception:   return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)   File "C:\Python\lib\site-packages\django\db\backends\utils.py", line 77, in
  _execute_with_wrappers
  
      return executor(sql, params, many, context)
  
    File "C:\Python\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
      return self.cursor.execute(sql, params)   File "C:\Python\lib\site-packages\django\db\utils.py", line 89, in __exit__
      raise dj_exc_value.with_traceback(traceback) from exc_value   File "C:\Python\lib\site-packages\django\db\backends\utils.py", line 85, in
  _execute
      return self.cursor.execute(sql, params)   File "C:\Python\lib\site-packages\django\db\backends\sqlite3\base.py", line 303, in execute
      return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: near ")": syntax error
  </code></pre>
  
  <p>As far I remember I have updated my templates and url.py file after the last migration, here is my urls.py.
  I can still runserver and I see no errors at the frontend!</p>
  
  <pre><code>urlpatterns = [
      path('admin/', admin.site.urls),
      path("signup/", accounts_views.signup, name='signup'),
      path('logout/', auth_views.LogoutView.as_view(), name='logout'),
      path('login/', auth_views.LoginView.as_view(template_name='login.html'), name='login'),
      path("", views.home, name='home'),
      path('reset/', auth_views.PasswordResetView.as_view(template_name='password_reset.html', email_template_name='password_reset_email.html', subject_template_name='password_reset_subject.txt'), name='password_reset'),
      path('reset/done/', auth_views.PasswordResetDoneView.as_view(template_name='password_reset_done.html'), name='password_reset_done'),
      path('reset/&lt;int:pk&gt;/', auth_views.PasswordResetConfirmView.as_view(template_name='password_reset_confirm.html'), name='password_reset_confirm'),
      path('reset/complete/', auth_views.PasswordResetCompleteView.as_view(template_name='password_resert_complete.html'), name='password_reset_complete'),
      path('settings/password/', auth_views.PasswordChangeView.as_view(template_name='password_change.html'),
      name='password_change'),
      path('settings/password/done/', auth_views.PasswordChangeDoneView.as_view(template_name='password_change_done.html'),
      name='password_change_done'),
      ]
  </code></pre>
  
  <p>edit 1 :</p>
  
  <p>Here is my migrations file-</p>
  
  <pre><code># Generated by Django 2.0.5 on 2018-09-09 13:41
  
  from django.conf import settings
  import django.contrib.auth.models
  from django.db import migrations, models
  import django.db.models.deletion
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('auth', '0009_alter_user_last_name_max_length'),
          ('accounts', '0001_initial'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='User',
              fields=[
                  ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'user',
                  'verbose_name_plural': 'users',
                  'abstract': False,
              },
              bases=('auth.user', models.Model),
              managers=[
                  ('objects', django.contrib.auth.models.UserManager()),
              ],
          ),
          migrations.RemoveField(
              model_name='profile',
              name='user',
          ),
          migrations.DeleteModel(
              name='profile',
          ),
      ]
  </code></pre>
  
  <p>second migration file -</p>
  
  <pre><code># Generated by Django 2.0.5 on 2018-09-10 08:50
  
  from django.db import migrations
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('admin', '0002_logentry_remove_auto_add'),
          ('accounts', '0002_auto_20180909_1911'),
      ]
  
      operations = [
          migrations.RemoveField(
              model_name='user',
              name='user_ptr',
          ),
          migrations.DeleteModel(
              name='User',
          ),
      ]
  </code></pre>
  
  <p>Can anyone help me out with this? Where exactly is the syntax error?</p>