﻿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
28746	Model missing custom Meta option in migrations	JP Navarro	nobody	"Given:

{{{
class AbstractGlue2Model(models.Model):
    ID = models.CharField(primary_key=True, max_length=200)
    <stuff>
    class Meta:
        abstract = True
        db_name = 'glue2'
...
class Contact(AbstractGlue2Model):
    Detail = models.CharField(max_length=128)
    Type = models.CharField(max_length=16)
}}}


A migrate that should create the new Contacts DB objects sees inherited fields (such as ID), but is missing Meta db_name value:


{{{
(Pdb) pp hints['model']
<class 'Contact'>
(Pdb) pp hints['model']._meta.db_name
*** AttributeError: AttributeError(""'Options' object has no attribute 'db_name'"",)
(Pdb) pp hints['model']._meta.abstract
False
(Pdb) pp hints['model'].ID
<django.db.models.query_utils.DeferredAttribute object at 0x10f97d6d0>
}}}


"	Bug	closed	Migrations	1.10	Normal	invalid	abstract Meta inheritance		Unreviewed	0	0	0	0	0	0
