#34926: Missing model after squashing
------------------------------------+--------------------------------------
Reporter: Sebastian Jekutsch | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Comment (by Mariusz Felisiak):
Replying to [comment:3 Sebastian Jekutsch]:
> Right, but it's below its first reference in model Topic within the
script, so an initial database migration will raise an "ValueError:
Related model 'knowledgebase.activity' cannot be resolved".
> (Apologize for not stating the problem more specific.)
That is also not true:
{{{
migrations.CreateModel(
name="Activity",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=50)),
(
"members",
models.ManyToManyField(
blank=True,
related_name="memberships",
to="knowledgebase.activity",
),
),
("alternative_names", models.CharField(blank=True,
max_length=250)),
],
options={
"verbose_name": "Activity",
"verbose_name_plural": "Activities",
"ordering":
[django.db.models.functions.text.Lower("name")],
},
),
migrations.AddField(
model_name="topic",
name="activities",
field=models.ManyToManyField(
blank=True, related_name="activities",
to="knowledgebase.activity"
),
),
}}}
Please see TicketClosingReasons/UseSupportChannels for ways to get help
and don't use Trac as a support channel.
--
Ticket URL: <https://code.djangoproject.com/ticket/34926#comment:4>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107018b635fd98f-5f8f54dc-0a4b-47b7-bf1d-f97dc411c4e0-000000%40eu-central-1.amazonses.com.