#23101: Changing name of M2MField while db_table keeps table name unchanged
leads
to spurious migration that changes table name
---------------------------------+------------------------------------
Reporter: maney@… | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7-rc-1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by bmispelon):
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* type: Uncategorized => Bug
* needs_tests: => 0
* needs_docs: => 0
Comment:
Hi,
I cna reproduce the issue with a very simple scenario and it seems quite
serious.
Using these models:
{{{#!python
class Foo(models.Model):
pass
class Bar(models.Model):
foos = models.ManyToManyField("Foo", db_table='custom_table')
}}}
Running `manage.py makemigrations` and `manage.py migrate` creates a table
called `<app_name>__bar_foos` instead of `custom_table`.
This works fine in 1.6 so it's definitely a release blocker.
Thanks.
--
Ticket URL: <https://code.djangoproject.com/ticket/23101#comment:1>
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/073.268b7f3f46061ed4610455e723a859b5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.