title: django changing a date field to integer field can't migrate
body: <p>I recently changed a date field to an integer field (the data was specified in number of months remaining rather than a date). </p>
  
  <p>However all though the make migrations command works fine when I attempt to migrate this fails with a typecast error (note using postgres 9.5). Note there was only 1 instance/entry of the model, which I have also now deleted and the migrate still fails for some reason?</p>
  
  <pre><code>File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
  psycopg2.ProgrammingError: cannot cast type date to integer
  LINE 1: ...end_date_fixed" TYPE integer USING "end_date_fixed"::integer
                                                                ^
  
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "manage.py", line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/core/management/base.py", line 348, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/core/management/base.py", line 399, in execute
      output = self.handle(*args, **options)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 200, in handle
      executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/migrations/executor.py", line 92, in migrate
      self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/migrations/executor.py", line 121, in _migrate_all_forwards
      state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/migrations/executor.py", line 198, in apply_migration
      state = migration.apply(state, schema_editor)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/migrations/migration.py", line 123, in apply
      operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/migrations/operations/fields.py", line 201, in database_forwards
      schema_editor.alter_field(from_model, from_field, to_field)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 482, in alter_field
      old_db_params, new_db_params, strict)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/postgresql/schema.py", line 110, in _alter_field
      new_db_params, strict,
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 634, in _alter_field
      params,
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 110, in execute
      cursor.execute(sql, params)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/utils.py", line 79, in execute
      return super(CursorDebugWrapper, self).execute(sql, params)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/utils.py", line 95, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
      raise value.with_traceback(tb)
    File "/Users/Yunti/.virtualenvs/switcher5/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
  django.db.utils.ProgrammingError: cannot cast type date to integer
  LINE 1: ...end_date_fixed" TYPE integer USING "end_date_fixed"::integer
  </code></pre>