#28789: Django won't update sqlite_master table using
migrations.AlterModelTable,
which causes loaddata to fail.
-------------------------------------+-------------------------------------
Reporter: Rafael Pires | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 1.11
Severity: Normal | Resolution: duplicate
Keywords: migrations, sqlite3 | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by MarcoGlauser):
We ran into the same problem with django 1.11. The fix hasn't been
backported to 1.11 and I don't think it will be backported any time soon.
After some trial and error, we found a workaround:
We copy the original Foreignkey definition and append it to the migration
that contains the AlterModelTable as a AlterField. This will update the
Foreignkey in SQLite.
--
Ticket URL: <https://code.djangoproject.com/ticket/28789#comment:5>
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/065.be367c56a0e6024dc9fd6b1be0761900%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.