question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing migrations

See original GitHub issue

django-q version 1.3.8:

$ poetry show django-q
name         : django-q
version      : 1.3.8
description  : A multiprocessing distributed task queue for Django

dependencies
 - arrow >=1.1.0,<2.0.0
 - blessed >=1.17.6,<2.0.0
 - django >=2.2
 - django-picklefield >=3.0.1,<4.0.0
 - redis >=3.5.3,<4.0.0

Run ./manage.py makemigrations:

$ poetry run python manage.py makemigrations
Migrations for 'django_q':
  /home/<user>/.cache/pypoetry/virtualenvs/scraper-l9iOEXUD-py3.8/lib/python3.8/site-packages/django_q/migrations/0015_auto_20210624_2029.py
    - Alter field id on ormq
    - Alter field id on schedule
...

This is a problem because I have a model in my project with a ForeignKey(django_q.Schedule) field. My migrations now have a dependency to the migration file I generated with makemigrations. This will cause problems when someone finally adds migrations to this project and we have conflicting files.

I confirmed that this migration file is also missing from 1.3.9.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
laynel-lkcommented, Jul 7, 2021

We added id defaults in 1.3.8 which is a requirement for Django 3.2.

I suspect this is most likely the problem. You added DEFAULT_AUTO_FIELD to your settings.py but did not run ./manage.py makemigrations nor committed the generated migrations file.

0reactions
codeguru42commented, Nov 7, 2021

When I run pip install --upgrade django-q then ./manage.py migrate, I no longer see the message that model changes are not reflected in a migration.

@Koed00 This issue can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing Migrants - International Organization for Migration
Missing Migrants Project records since 2014 people who die in the process of migration towards an international destination, regardless of their legal status....
Read more >
include missing migrations · Issue #183 · pressly/goose
I've been using a fork of this package (see #140) to use --include-missing flag. https://github.com/elijahcarrel/goose/ This is probably ...
Read more >
flyway.ignoreMigrationPatterns - Ignore Migration Patterns
Ignore migrations during validate and repair according to a given list of patterns. Only Missing migrations are ignored during repair . Patterns. Patterns...
Read more >
"Missing migrations upgrade_d7_field_instance" because ...
Trying to migrate any migrations that depend on "upgrade_d7_field_instance" will fail if in the original database duplicate combined field_name ...
Read more >
support for out-of-order migrations - pressly/goose
Let's back it up, what are "missing" or "out-of-order" migrations? Suppose migration 1 and 4 are applied and then 2, 3, 5 are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found