#23599: Default application used in startapp has an empty migration package
-------------------------------------+-------------------------------------
     Reporter:  yakky                |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Migrations           |                  Version:  1.7
     Severity:  Normal               |               Resolution:
     Keywords:  migrations,          |             Triage Stage:
  dependencies, template             |  Unreviewed
  application                        |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by yakky):

 Replying to [comment:1 apollo13]:
 > > Any specific reason for shipping the migration directory in the
 template application?
 >
 > New apps are supposed to be migration ready by default, the module
 serves as marker for that.
 >
 > > This may trigger errors when trying to resolve model dependencies: say
 for example in a newly created application with a custom user model and an
 existing application which uses the custom user model and that already has
 migrations.
 >
 > Examples? Preferably simple ones which don't involve django-cms :)
 This sample project https://github.com/jsma/cmstest should be simple
 enough to run. It depends on django CMS but it's just an installable
 dependency.

 (cmstest-user)yakky@andalu: /srv/repo/cmstest/cmstest $ ../manage.py
 makemigrations accounts

     django.db.migrations.state.InvalidBasesError: Cannot resolve bases for
 [<ModelState: 'cms.PageUser'>]
     This can happen if you are inheriting models from an app with
 migrations (e.g. contrib.auth) in an app with no migrations; see
 https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for
 more

 By removing the empty migrations directory in cmstests.accounts the
 migration is created correctly and everything applies cleanly.

--
Ticket URL: <https://code.djangoproject.com/ticket/23599#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.59d948edf58528a5f18e319b6691e214%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to