title: I keep getting the following error django.db.utils.ProgrammingError: column "name" of relation "blog_post" already exists in my django app
body: <p>When I try to Migrate I get the following error</p>
  
  <pre><code>django.db.utils.ProgrammingError: column "name" of relation "blog_post" already exists
  </code></pre>
  
  <p>now I have assumed that the message means that I am trying to make a column named "name" and one with the same name already exists. So I looked at my model to make sure one didn't exist and it doesn't. I don't understand what the issue is. Here is my model. Oh and I ran migrations first before I ran migrate. so that's not the issue</p>
  
  <pre><code>class Post(models.Model):
  
  STATUS_CHOICES = (
     ('draft', 'Draft'),
     ('published', 'Published'),
  )
  title = models.CharField(max_length=250, unique=True)
  slug = models.SlugField(max_length=250,
                          unique_for_date='publish')
  image = models.ImageField(upload_to=upload_location,
                            null=True,
                            blank=True,
                            height_field='height_field',
                            width_field='width_field')
  image_url = models.CharField(max_length=500,
                               null=True,
                               blank=True,
                               )
  height_field = models.IntegerField(default=0,
                                     null=True,
                                     blank=True,
                                     )
  width_field = models.IntegerField(default=0,
                                    null=True,
                                    blank=True,
                                    )
  author = models.ForeignKey(User,
                             related_name='blog_posts',
                             null=True,
                             blank=True,)
  body = models.TextField(null=True, blank=True,)
  publish = models.DateTimeField(default=timezone.now)
  created = models.DateTimeField(auto_now_add=True)
  updated = models.DateTimeField(auto_now=True)
  status = models.CharField(max_length=10,
                            choices=STATUS_CHOICES,
                            default='draft')
  video = models.BooleanField(default=False)
  video_path = models.CharField(max_length=320,
                                null=True,
                                blank=True,)
  url = models.CharField(max_length=320,
                         null=True,
                         blank=True, )
  name = models.CharField(max_length=320,
                          null=True,
                          blank=True, )
  
  class Meta:
      ordering = ('-publish',)
  
  def __str__(self):
      return self.title
  
  def get_absolute_url(self):
      return reverse('blog:post_detail', kwargs={"slug": self.slug})
  
  objects = models.Manager() # The default manager.
  published = PublishedManager() # Our custom manager.
  tags = TaggableManager(blank=True)
  </code></pre>
  
  <p>and here is my views.py</p>
  
  <pre><code>    def post_list(request, tag_slug=None):
  if request.user.is_staff or request.user.is_superuser:
      object_list = Post.objects.all().order_by('-id')
  else:
      object_list = Post.published.all().order_by('-id')
  articles = Article.objects.all()[:8]
  # latest_article = Post.published.latest('created')
  
  query = request.GET.get("q")
  if query:
      object_list = object_list.filter(
          Q(title__icontains=query) |
          Q(body__icontains=query) |
          Q(tags__name__in=[query])
      ).distinct()
  
  tag = None
  if tag_slug:
      tag = get_object_or_404(Tag, slug=tag_slug)
      object_list = object_list.filter(tags__in=[tag])
  paginator = Paginator(object_list, 15) # 3 posts in each page
  page = request.GET.get('page')
  try:
      posts = paginator.page(page)
  except PageNotAnInteger:
      # If page is not an integer deliver the first page
      posts = paginator.page(1)
  except EmptyPage:
      # If page is out of range deliver last page of results
      posts = paginator.page(paginator.num_pages)
  
  css_left = 'col-xs-12 col-lg-12 col-centered'
  # css_right = 'col-xs-12 col-lg-3'
  template = 'blog/post/list.html'
  title = 'home'
  page_num = paginator.num_pages
  local = os.getenv('_system_name')
  context = {
      'page': page,
      'posts': posts,
      'tag': tag,
      'title': title,
      'articles': articles,
      'css_left': css_left,
      'paginator': paginator,
      'page_num': page_num,
      'local': local,
      'query': query
      # 'css_right': css_right
      # 'latest': latest_article
  }
  return render(request, template, context)
  </code></pre>
  
  <p>and here is the traceback</p>
  
  <pre><code>Running migrations:
    Rendering model states... DONE
    Applying blog.0008_auto_20160625_1708...Traceback (most recent call last):
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
  psycopg2.ProgrammingError: column "name" of relation "blog_post" already exists
  
  
  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/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/Users/ray/Desktop/myheroku/practice/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/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/core/management/base.py", line 348, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/core/management/base.py", line 399, in execute
      output = self.handle(*args, **options)
    File "/Users/ray/Desktop/myheroku/practice/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/ray/Desktop/myheroku/practice/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/ray/Desktop/myheroku/practice/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/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/migrations/executor.py", line 198, in apply_migration
      state = migration.apply(state, schema_editor)
    File "/Users/ray/Desktop/myheroku/practice/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/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/migrations/operations/fields.py", line 62, in database_forwards
      field,
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 396, in add_field
      self.execute(sql, params)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 110, in execute
      cursor.execute(sql, params)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/utils.py", line 79, in execute
      return super(CursorDebugWrapper, self).execute(sql, params)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/utils.py", line 95, in __exit__
      six.reraise(dj_exc_type, dj_exc_value, traceback)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
      raise value.with_traceback(tb)
    File "/Users/ray/Desktop/myheroku/practice/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
  django.db.utils.ProgrammingError: column "name" of relation "blog_post" already exists
  </code></pre>