﻿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
22708	migrations doesn't migrate	strelnikovdmitrij	nobody	"what does it exactly means and how to handle it?
all the time after adding new model this raise error
if not raising, (on very basic models add) and new model should be created - its actually don't create any
{{{
Django version 1.7b4
Python 2.7.6 (v2.7.6:3a1db0d2747e, Nov 10 2013, 00:42:54) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Migrations for 'account':
  0004_auto_20140527_1518.py:
    - Create model LoginFailed
    - Alter field ip on loginactivity
dmitrij$ python manage.py migrate
Operations to perform:
  Synchronize unmigrated apps: ***
  Apply all migrations: account, ***
Synchronizing apps without migrations:
  Creating tables...
  Installing custom SQL...
  Installing indexes...
Running migrations:
  Applying account.0004_auto_20140527_1518...Traceback (most recent call last):
  File ""manage.py"", line 10, in <module>
    execute_from_command_line(sys.argv)
  File ""/Users/dmitrij/dev/django/django/core/management/__init__.py"", line 427, in execute_from_command_line
    utility.execute()
  File ""/Users/dmitrij/dev/django/django/core/management/__init__.py"", line 419, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File ""/Users/dmitrij/dev/django/django/core/management/base.py"", line 288, in run_from_argv
    self.execute(*args, **options.__dict__)
  File ""/Users/dmitrij/dev/django/django/core/management/base.py"", line 337, in execute
    output = self.handle(*args, **options)
  File ""/Users/dmitrij/dev/django/django/core/management/commands/migrate.py"", line 146, in handle
    executor.migrate(targets, plan, fake=options.get(""fake"", False))
  File ""/Users/dmitrij/dev/django/django/db/migrations/executor.py"", line 62, in migrate
    self.apply_migration(migration, fake=fake)
  File ""/Users/dmitrij/dev/django/django/db/migrations/executor.py"", line 90, in apply_migration
    if self.detect_soft_applied(migration):
  File ""/Users/dmitrij/dev/django/django/db/migrations/executor.py"", line 134, in detect_soft_applied
    apps = project_state.render()
  File ""/Users/dmitrij/dev/django/django/db/migrations/state.py"", line 68, in render
    raise InvalidBasesError(""Cannot resolve bases for %r"" % new_unrendered_models)
django.db.migrations.state.InvalidBasesError: Cannot resolve bases for [<django.db.migrations.state.ModelState object at 0x102f19ad0>, <django.db.migrations.state.ModelState object at 0x102f19b90>, <django.db.migrations.state.ModelState object at 0x102f19c50>]

---0004_auto_20140527_1518.py---

# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations
import django.utils.timezone
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('account', '0003_loginactivity'),
    ]

    operations = [
        migrations.CreateModel(
            name='LoginFailed',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
                ('user', models.ForeignKey(to_field='id', blank=True, to=settings.AUTH_USER_MODEL, null=True)),
                ('username', models.CharField(max_length=120)),
                ('password', models.CharField(max_length=120, null=True, blank=True)),
                ('created', models.DateField(default=django.utils.timezone.now)),
                ('ip', models.GenericIPAddressField(null=True, blank=True)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.AlterField(
            model_name='loginactivity',
            name='ip',
            field=models.GenericIPAddressField(),
        ),
    ]
}}}"	Bug	new	Migrations	1.7-beta-2	Normal				Unreviewed	0	0	0	0	0	0
