﻿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
22447	Migrations have bases=(NewBase,) for models with custom metaclass	Craig de Stigter	Simon Charette	"With this model:

{{{
from django.db import models
from django.db.models.base import ModelBase
from django.utils import six


class MetaZork(ModelBase):
    pass


class BlibbityBlorg(six.with_metaclass(MetaZork, models.Model)):
    ZerbyBlugg = models.CharField(max_length=1)
}}}

`django-admin makemigrations` produces the following:

{{{
    operations = [
        migrations.CreateModel(
            name=b'BlibbityBlorg',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                (b'ZerbyBlugg', models.CharField(max_length=1)),
            ],
            options={
            },
            bases=(django.db.models.base.NewBase,),
        ),
    ]
}}}

NewBase is a `six` artifact; the correct base would be models.Model.


Originally reported by petkostas on django-mptt: https://github.com/django-mptt/django-mptt/issues/302"	Bug	closed	Migrations	1.7-beta-1	Release blocker	fixed		Sebastian Bauer	Ready for checkin	1	0	0	0	0	0
