﻿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
22356	unique_together fails when referencing columns from base and child class	Claus Conrad	Marc Egli	"Not sure whether this bug belongs to ""System checks"", ""ORM"" or ""Migrations"", but thought I'd report it:

class Foo(models.Model):
    url = models.URLField(""URL"", blank=True)

class Bar(Foo):
    blip = models.CharField(max_length=10)
    class Meta:
        unique_together = (
            'url',
            'blip'
        )

---

$ python manage.py check
System check identified no issues (0 silenced).

---

$ python manage.py makemigrations
$ python manage.py migrate

  File ""/usr/lib/python3.3/site-packages/Django-1.7b1-py3.3.egg/django/db/backends/utils.py"", line 61, in execute
    return self.cursor.execute(sql, params)
psycopg2.ProgrammingError: column ""url"" named in key does not exist
"	Bug	closed	Core (System checks)	1.7-beta-1	Normal	fixed		Shai Berger adrien	Ready for checkin	1	0	1	0	0	0
