#28250: migration depending on non-existing legacy migration
-------------------------------+------------------------------------------
     Reporter:  Brian May      |                    Owner:  Marten Kenbeek
         Type:  Uncategorized  |                   Status:  assigned
    Component:  Migrations     |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+------------------------------------------

Comment (by Raphaƫl Hertzog):

 Replying to [comment:10 Marten Kenbeek]:
 > I've created a [https://github.com/django/django/pull/8577 PR] with some
 additional changes.

 Thanks Marten for that work. I asked the lava-server maintainer to test
 this patch, unfortunately the "migrate" call is still failing for him,
 albeit with another error further down the road:

 {{{
 Operations to perform:
   Apply all migrations: admin, auth, contenttypes, dashboard_app,
 google_analytics, lava_results_app, lava_scheduler_app,
 linaro_django_xmlrpc, sessions, sites
 Traceback (most recent call last):
   File "/usr/bin/lava-server", line 78, in <module>
     main()
   File "/usr/bin/lava-server", line 74, in main
     execute_from_command_line(django_options)
   File "/usr/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 367, in
 execute_from_command_line
     utility.execute()
   File "/usr/lib/python2.7/dist-
 packages/django/core/management/__init__.py", line 359, in execute
     self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
 line 294, in run_from_argv
     self.execute(*args, **cmd_options)
   File "/usr/lib/python2.7/dist-packages/django/core/management/base.py",
 line 345, in execute
     output = self.handle(*args, **options)
   File "/usr/lib/python2.7/dist-
 packages/django/core/management/commands/migrate.py", line 164, in handle
     pre_migrate_apps = pre_migrate_state.apps
   File "/usr/lib/python2.7/dist-packages/django/utils/functional.py", line
 35, in __get__
     res = instance.__dict__[self.name] = self.func(instance)
   File "/usr/lib/python2.7/dist-packages/django/db/migrations/state.py",
 line 176, in apps
     return StateApps(self.real_apps, self.models)
   File "/usr/lib/python2.7/dist-packages/django/db/migrations/state.py",
 line 249, in __init__
     raise ValueError("\n".join(error.msg for error in errors))
 ValueError: The field lava_scheduler_app.TestJob.submit_token was declared
 with a lazy reference to 'linaro_django_xmlrpc.authtoken', but app
 'linaro_django_xmlrpc' isn't installed.
 }}}

 But `linaro_django_xmlrpc` definitely is in the INSTALLED_APPS setting. So
 I'm not sure what the problem is... if you want to have a look at the
 lava-server code, it's over here:

 The migrate operation is done with this version installed:
 https://sources.debian.net/src/lava-server/2016.12-1/
 But the application's database was created with this version:
 https://sources.debian.net/src/lava-server/2014.09.1-1/
 Git repo if you want fine-grained history: https://github.com/Linaro/lava-
 server

--
Ticket URL: <https://code.djangoproject.com/ticket/28250#comment:11>
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.a6638477e2cfd66fbe4479aa5d0a740a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to