title: Cant apply django migration that changes primary key name
body: <p>I am trying to rename some models and fields that have names I do not like. I am using an mssql database. I have a very simple model. An example would look something like this:</p>
  <pre><code>class RootProblem(models.Model):
     rootproblemid = models.AutoField(db_column=&quot;RootProblemID&quot;, primary_key=True)
     description = models.CharField(
         db_column=&quot;Root Problems&quot;, unique=True, max_length=255, blank=False, null=True
     )
  </code></pre>
  <p>I would like to rename the primary key from &quot;rootproblemid&quot; to something like &quot;id&quot;. But when I change the name, run makemigrations, and then try to apply the new migration I get an error that says:</p>
  <pre><code>    execute_from_command_line(sys.argv)
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py&quot;, line 401, in execute_from_command_line
      utility.execute()
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py&quot;, line 395, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 330, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 371, in execute
      output = self.handle(*args, **options)
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 85, in wrapped
      res = handle_func(*args, **kwargs)
    File &quot;/usr/local/lib/python3.9/site-packages/django/core/management/commands/migrate.py&quot;, line 243, in handle
      post_migrate_state = executor.migrate(
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py&quot;, line 117, in migrate
      state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py&quot;, line 147, in _migrate_all_forwards
      state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py&quot;, line 227, in apply_migration
      state = migration.apply(state, schema_editor)
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/migrations/migration.py&quot;, line 124, in apply
      operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/migrations/operations/fields.py&quot;, line 338, in database_forwards
      schema_editor.alter_field(
    File &quot;/usr/local/lib/python3.9/site-packages/django/db/backends/base/schema.py&quot;, line 571, in alter_field
      self._alter_field(model, old_field, new_field, old_type, new_type,
    File &quot;/usr/local/lib/python3.9/site-packages/mssql/schema.py&quot;, line 282, in _alter_field
      raise NotImplementedError(&quot;the backend doesn't support altering from/to %s.&quot; % t.__name__)
  NotImplementedError: the backend doesn't support altering from/to AutoField.
  </code></pre>
  <p>I am able to change the names of all the other fields, but none of the primary key fields. Is this telling me that django doesn't support altering the name of an autofield for my backend?
  If so how would I get around this?</p>