﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
22927	Can't create migration when index together is used	lvella	nobody	"With python 3.4, if I have the following minimal model:

{{{

from django.db import models

class A(models.Model):
    a = models.IntegerField()
    b = models.IntegerField()

    class Meta:
        index_together = [('a', 'b')]
}}}

And try to make migrations:

{{{
$ ./manage.py makemigrations
Migrations for 'indextg':
  0001_initial.py:
    - Create model A
Traceback (most recent call last):
  File ""./manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/__init__.py"", line 385, in execute_from_command_line
    utility.execute()
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/__init__.py"", line 377, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/base.py"", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/base.py"", line 337, in execute
    output = self.handle(*args, **options)
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/commands/makemigrations.py"", line 115, in handle
    self.write_migration_files(changes)
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/core/management/commands/makemigrations.py"", line 131, in write_migration_files
    self.stdout.write(""    - %s\n"" % operation.describe())
  File ""/home/lucas/tmp/bug/venv/lib/python3.4/site-packages/django/db/migrations/operations/models.py"", line 291, in describe
    return ""Alter %s for %s (%s constraints)"" % (self.self.option_name, self.name, len(self.index_together))
AttributeError: 'AlterIndexTogether' object has no attribute 'self'
}}}
"	Uncategorized	closed	Uncategorized	1.7-rc-1	Normal	duplicate			Unreviewed	0	0	0	0	0	0
